Move setting content_type to AV

This commit is contained in:
Łukasz Strzałkowski 2013-07-23 18:50:22 +02:00
parent 0b4507a26f
commit cb2d671cb8
3 changed files with 3 additions and 2 deletions

View File

@ -12,7 +12,6 @@ module ActionController
def render(*args) #:nodoc:
raise ::AbstractController::DoubleRenderError if response_body
super
self.content_type ||= Mime[lookup_context.rendered_format].to_s
response_body
end

View File

@ -38,7 +38,7 @@ module ActionView
initializer "action_view.setup_action_pack", before: :add_view_paths do |app|
ActiveSupport.on_load(:action_controller) do
ActionController::Base.superclass.send(:include, ActionView::Layouts)
#ActionController::Base.superclass.send(:include, ActionView::Layouts)
end
end

View File

@ -82,6 +82,8 @@ module ActionView
super(*args, &block)
options = _normalize_render(*args, &block)
self.content_type ||= Mime[lookup_context.rendered_format].to_s
self.response_body = render_to_body(options)
end