lib/bulkrax.rb in bulkrax-5.0.0 vs lib/bulkrax.rb in bulkrax-5.1.0
- old
+ new
@@ -183,9 +183,15 @@
def self.normalize_string(value)
# Removing [Byte Order Mark (BOM)](https://en.wikipedia.org/wiki/Byte_order_mark)
value.to_s.delete("\xEF\xBB\xBF")
end
+ def self.fallback_user_for_importer_exporter_processing
+ return User.batch_user if defined?(Hyrax) && User.respond_to?(:batch_user)
+
+ raise "We have no fallback user available for Bulkrax.fallback_user_for_importer_exporter_processing"
+ end
+
# This class confirms to the Active::Support.serialze interface. It's job is to ensure that we
# don't have keys with the tricksy Byte Order Mark character.
#
# @see https://api.rubyonrails.org/classes/ActiveRecord/AttributeMethods/Serialization/ClassMethods.html#method-i-serialize
class NormalizedJson