diff options
author | Łukasz Strzałkowski <lukasz.strzalkowski@gmail.com> | 2013-07-23 18:50:22 +0200 |
---|---|---|
committer | Łukasz Strzałkowski <lukasz.strzalkowski@gmail.com> | 2013-08-25 11:39:11 +0200 |
commit | cb2d671cb884a7cfeb991ce5af5d7e1047685dbd (patch) | |
tree | 90aec1f8fe301c87f240ce36660a41faeb5c38bf | |
parent | 0b4507a26f7c4807ea14ce70c41033c9868f83e3 (diff) | |
download | rails-cb2d671cb884a7cfeb991ce5af5d7e1047685dbd.tar.gz rails-cb2d671cb884a7cfeb991ce5af5d7e1047685dbd.tar.bz2 rails-cb2d671cb884a7cfeb991ce5af5d7e1047685dbd.zip |
Move setting content_type to AV
-rw-r--r-- | actionpack/lib/action_controller/metal/rendering.rb | 1 | ||||
-rw-r--r-- | actionview/lib/action_view/railtie.rb | 2 | ||||
-rw-r--r-- | actionview/lib/action_view/rendering.rb | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb index f0e8945f11..cdc63d67a3 100644 --- a/actionpack/lib/action_controller/metal/rendering.rb +++ b/actionpack/lib/action_controller/metal/rendering.rb @@ -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 diff --git a/actionview/lib/action_view/railtie.rb b/actionview/lib/action_view/railtie.rb index 8382023e06..441bdccd84 100644 --- a/actionview/lib/action_view/railtie.rb +++ b/actionview/lib/action_view/railtie.rb @@ -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 diff --git a/actionview/lib/action_view/rendering.rb b/actionview/lib/action_view/rendering.rb index e3d0beade3..0db469766c 100644 --- a/actionview/lib/action_view/rendering.rb +++ b/actionview/lib/action_view/rendering.rb @@ -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 |