diff options
-rw-r--r-- | actionpack/lib/abstract_controller/base.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/metal/rendering.rb | 2 | ||||
-rw-r--r-- | actionview/lib/action_view/railtie.rb | 6 |
3 files changed, 7 insertions, 3 deletions
diff --git a/actionpack/lib/abstract_controller/base.rb b/actionpack/lib/abstract_controller/base.rb index af5de815bb..8949a9fc78 100644 --- a/actionpack/lib/abstract_controller/base.rb +++ b/actionpack/lib/abstract_controller/base.rb @@ -163,6 +163,8 @@ module AbstractController method_for_action(action_name).present? end + ActiveSupport.run_load_hooks(:abstract_controller, self) + private # Returns true if the name can be considered an action because diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb index e89542f9f9..f0e8945f11 100644 --- a/actionpack/lib/action_controller/metal/rendering.rb +++ b/actionpack/lib/action_controller/metal/rendering.rb @@ -2,8 +2,6 @@ module ActionController module Rendering extend ActiveSupport::Concern - include ActionView::Rendering - # Before processing, set the request formats in current controller formats. def process_action(*) #:nodoc: self.formats = request.formats.map(&:ref).compact diff --git a/actionview/lib/action_view/railtie.rb b/actionview/lib/action_view/railtie.rb index a9b33f2ca2..d349af3748 100644 --- a/actionview/lib/action_view/railtie.rb +++ b/actionview/lib/action_view/railtie.rb @@ -36,10 +36,14 @@ module ActionView end end - initializer "action_view.setup_action_controller" do |app| + initializer "action_view.setup_action_pack" do |app| ActiveSupport.on_load(:action_controller) do ActionController::Base.send(:include, ActionView::Layouts) end + + ActiveSupport.on_load(:abstract_controller) do + AbstractController::Base.send(:include, ActionView::Rendering) + end end end end |