Browse files

Hook up AV::Rendering on AV intialization

  • Loading branch information...
1 parent c48ce6e commit 766fa97b457fb2f9903f80aaec640cd1d08a1bbd @lukaszx0 lukaszx0 committed Jun 26, 2013
View
2 actionpack/lib/abstract_controller/base.rb
@@ -163,6 +163,8 @@ def available_action?(action_name)
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
View
2 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
View
6 actionview/lib/action_view/railtie.rb
@@ -36,10 +36,14 @@ class Railtie < Rails::Railtie # :nodoc:
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

0 comments on commit 766fa97

Please sign in to comment.