lib/gretel.rb in gretel-3.0.6 vs lib/gretel.rb in gretel-3.0.7

- old
+ new

@@ -14,10 +14,14 @@ # Returns the path from with breadcrumbs are loaded. Default is +config/breadcrumbs.rb+ # in the app and all loaded engines. Breadcrumbs set in the app will override # breadcrumbs set in engines. def breadcrumb_paths @breadcrumb_paths ||= begin - engine_roots = Rails::Application::Railties.engines.map { |e| e.config.root } + engines = Rails::Application::Railties.respond_to?(:engines) ? + Rails::Application::Railties.engines : + Rails::Engine.subclasses.map(&:instance) + + engine_roots = engines.map { |e| e.config.root } [*engine_roots, Rails.root].map do |root| [root.join("config", "breadcrumbs.rb"), root.join("config", "breadcrumbs", "**", "*.rb"), root.join("app", "views", "breadcrumbs", "**", "*.rb")] \ No newline at end of file