From e064658d64f7fb071ec35764f2d5203e8b58e044 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Strza=C5=82kowski?= Date: Thu, 5 Dec 2013 00:22:50 +0100 Subject: [PATCH] Include AV::Layouts directly in AM::Base No need to do this in railtie as AM depends on AV either way --- actionmailer/lib/action_mailer/base.rb | 2 ++ actionview/lib/action_view/railtie.rb | 6 ------ 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 6f8ae055399..5723b2cc1ba 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -373,6 +373,8 @@ module ActionMailer include AbstractController::AssetPaths include AbstractController::Callbacks + include ActionView::Layouts + PROTECTED_IVARS = AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES + [:@_action_has_layout] def _protected_ivars # :nodoc: diff --git a/actionview/lib/action_view/railtie.rb b/actionview/lib/action_view/railtie.rb index 7db557ff836..e930ba9aae7 100644 --- a/actionview/lib/action_view/railtie.rb +++ b/actionview/lib/action_view/railtie.rb @@ -42,12 +42,6 @@ module ActionView end end - initializer "action_view.setup_action_mailer", before: :add_view_paths do |app| - ActiveSupport.on_load(:action_mailer) do - ActionMailer::Base.send(:include, ActionView::Layouts) - end - end - rake_tasks do load "action_view/tasks/dependencies.rake" end