Hook up AV::Rendering on AV intialization
This commit is contained in:
parent
c48ce6e73d
commit
766fa97b45
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue