Move setting content_type to AV
This commit is contained in:
parent
0b4507a26f
commit
cb2d671cb8
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue