diff options
Diffstat (limited to 'railties/lib/rails/engine.rb')
-rw-r--r-- | railties/lib/rails/engine.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/engine.rb b/railties/lib/rails/engine.rb index 8f5040ea13..85b4ff8470 100644 --- a/railties/lib/rails/engine.rb +++ b/railties/lib/rails/engine.rb @@ -97,8 +97,8 @@ module Rails initializer :add_view_paths do views = paths.app.views.to_a - ActionController::Base.prepend_view_path(views) if defined?(ActionController::Base) - ActionMailer::Base.prepend_view_path(views) if defined?(ActionMailer::Base) + ActionController.base_hook { prepend_view_path(views) } if defined?(ActionController) + ActionMailer.base_hook { prepend_view_path(views) } if defined?(ActionMailer) end initializer :add_metals do |app| |