aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2015-08-26 11:42:41 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2015-08-26 11:53:15 -0700
commit3cc35bed7a976911c2e80725185303c44a11a9b9 (patch)
treee9c6f7e2022ee66356f98c43b810f992b43c0f3b
parenta20c5236bf9e355407946010e30b146ed5f9eb87 (diff)
downloadrails-3cc35bed7a976911c2e80725185303c44a11a9b9.tar.gz
rails-3cc35bed7a976911c2e80725185303c44a11a9b9.tar.bz2
rails-3cc35bed7a976911c2e80725185303c44a11a9b9.zip
include ActionView::Rendering in the minimal controller
without this module, the content type is not set correctly
-rw-r--r--actionpack/lib/action_controller/metal.rb2
-rw-r--r--actionpack/test/controller/new_base/render_html_test.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal.rb b/actionpack/lib/action_controller/metal.rb
index 51562ec0fb..f7be1e1fc5 100644
--- a/actionpack/lib/action_controller/metal.rb
+++ b/actionpack/lib/action_controller/metal.rb
@@ -177,7 +177,7 @@ module ActionController
end
def content_type
- request.content_type
+ response.content_type
end
def location
diff --git a/actionpack/test/controller/new_base/render_html_test.rb b/actionpack/test/controller/new_base/render_html_test.rb
index e9ea57e329..49c1b67d04 100644
--- a/actionpack/test/controller/new_base/render_html_test.rb
+++ b/actionpack/test/controller/new_base/render_html_test.rb
@@ -4,6 +4,7 @@ module RenderHtml
class MinimalController < ActionController::Metal
include AbstractController::Rendering
include ActionController::Rendering
+ include ActionView::Rendering
def index
render html: "Hello World!"