Skip to content

Commit

Permalink
Include AV::Layouts directly in AM::Base
Browse files Browse the repository at this point in the history
No need to do this in railtie as AM depends on AV either way
  • Loading branch information
lukaszx0 committed Dec 5, 2013
1 parent d8888b9 commit e064658
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 2 additions & 0 deletions actionmailer/lib/action_mailer/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,8 @@ class Base < AbstractController::Base
include AbstractController::AssetPaths
include AbstractController::Callbacks

include ActionView::Layouts

PROTECTED_IVARS = AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES + [:@_action_has_layout]

def _protected_ivars # :nodoc:
Expand Down
6 changes: 0 additions & 6 deletions actionview/lib/action_view/railtie.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ class Railtie < Rails::Railtie # :nodoc:
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
Expand Down

0 comments on commit e064658

Please sign in to comment.