diff options
author | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-05-20 17:42:04 -0700 |
---|---|---|
committer | Yehuda Katz + Carl Lerche <ykatz+clerche@engineyard.com> | 2009-05-20 17:42:04 -0700 |
commit | 7f7fdc407a90c9ce75ce0a77bc0f631115514d2f (patch) | |
tree | f4ed4c40060ec75b09309adf370ce3e84d072cb2 /actionpack/lib/action_controller/new_base/renderer.rb | |
parent | c8eda9ade49700abce104de1ce7e8e1a754fc97e (diff) | |
download | rails-7f7fdc407a90c9ce75ce0a77bc0f631115514d2f.tar.gz rails-7f7fdc407a90c9ce75ce0a77bc0f631115514d2f.tar.bz2 rails-7f7fdc407a90c9ce75ce0a77bc0f631115514d2f.zip |
Make controller/content_type_test.rb pass on new base
Diffstat (limited to 'actionpack/lib/action_controller/new_base/renderer.rb')
-rw-r--r-- | actionpack/lib/action_controller/new_base/renderer.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/new_base/renderer.rb b/actionpack/lib/action_controller/new_base/renderer.rb index 6176212970..81685ca9d6 100644 --- a/actionpack/lib/action_controller/new_base/renderer.rb +++ b/actionpack/lib/action_controller/new_base/renderer.rb @@ -38,7 +38,11 @@ module ActionController ret = super(options) options[:_template] ||= _action_view._partial - response.content_type ||= options[:_template].mime_type + response.content_type ||= begin + mime = options[:_template].mime_type + mime &&= mime.to_sym + formats.include?(mime) ? mime : formats.first + end ret end |