diff --git a/lib/spree/auth/engine.rb b/lib/spree/auth/engine.rb index 10aff99ce..f2b992241 100644 --- a/lib/spree/auth/engine.rb +++ b/lib/spree/auth/engine.rb @@ -50,15 +50,15 @@ def self.activate end def self.backend_available? - @@backend_available ||= Rails::Engine::Railties.engines.map{ |e| e.class.to_s }.include?('Spree::Backend::Engine') + @@backend_available ||= ::Rails::Engine.subclasses.map(&:instance).map{ |e| e.class.to_s }.include?('Spree::Backend::Engine') end def self.dash_available? - @@dash_available ||= Rails::Engine::Railties.engines.map{ |e| e.class.to_s }.include?('Spree::Dash::Engine') + @@dash_available ||= ::Rails::Engine.subclasses.map(&:instance).map{ |e| e.class.to_s }.include?('Spree::Dash::Engine') end def self.frontend_available? - @@frontend_available ||= Rails::Engine::Railties.engines.map{ |e| e.class.to_s }.include?('Spree::Frontend::Engine') + @@frontend_available ||= ::Rails::Engine.subclasses.map(&:instance).map{ |e| e.class.to_s }.include?('Spree::Frontend::Engine') end if self.backend_available?