diff --git a/app/services/hyrax/curation_concern.rb b/app/services/hyrax/curation_concern.rb index f77efe3da2..8a7f1d9163 100644 --- a/app/services/hyrax/curation_concern.rb +++ b/app/services/hyrax/curation_concern.rb @@ -15,8 +15,10 @@ class CurationConcern # # You can customize the actor stack, so long as you do so before the actor # is used. Once it is used, it becomes immutable. - # This attribute is set by Hyrax::Engine - class_attribute :actor_factory + # @return [ActionDispatch::MiddlewareStack] + def self.actor_factory + Hyrax::DefaultMiddlewareStack.build_stack + end # A consumer of this method can inject a different factory # into this class in order to change the behavior of this method. diff --git a/lib/hyrax/engine.rb b/lib/hyrax/engine.rb index c1a12c4350..d805fc5bf8 100644 --- a/lib/hyrax/engine.rb +++ b/lib/hyrax/engine.rb @@ -37,10 +37,6 @@ class Engine < ::Rails::Engine end end - config.to_prepare do - Hyrax::CurationConcern.actor_factory = Hyrax::DefaultMiddlewareStack.build_stack - end - initializer 'requires' do require 'hydra/derivatives' require 'hyrax/controller_resource'