aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal/rendering.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-01-20 14:21:27 +0100
committerJosé Valim <jose.valim@gmail.com>2010-01-20 15:02:13 +0100
commit8e2fd54b19656a6edbd94f8707927d09e167e7fc (patch)
treec000b4aa817f677d8160a13e630a2536e76264d0 /actionpack/lib/action_controller/metal/rendering.rb
parent8b9bfbe225a59ccefa46f1e8bf301bc483bef0e0 (diff)
downloadrails-8e2fd54b19656a6edbd94f8707927d09e167e7fc.tar.gz
rails-8e2fd54b19656a6edbd94f8707927d09e167e7fc.tar.bz2
rails-8e2fd54b19656a6edbd94f8707927d09e167e7fc.zip
Bring normalize behavior to AbstractController::Rendering
Diffstat (limited to 'actionpack/lib/action_controller/metal/rendering.rb')
-rw-r--r--actionpack/lib/action_controller/metal/rendering.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/metal/rendering.rb b/actionpack/lib/action_controller/metal/rendering.rb
index 74e50bb032..475ed54167 100644
--- a/actionpack/lib/action_controller/metal/rendering.rb
+++ b/actionpack/lib/action_controller/metal/rendering.rb
@@ -12,9 +12,10 @@ module ActionController
super
end
- def render(options)
- super
- self.content_type ||= options[:_template].mime_type.to_s
+ def render(*args)
+ args << {} unless args.last.is_a?(Hash)
+ super(*args)
+ self.content_type ||= args.last[:_template].mime_type.to_s
response_body
end