aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/base/render.rb
diff options
context:
space:
mode:
authorPratik Naik <pratiknaik@gmail.com>2009-05-15 16:47:15 +0200
committerPratik Naik <pratiknaik@gmail.com>2009-05-15 16:47:15 +0200
commit59653101b8cef7915cb1fb4ad4b84f49ae0881e5 (patch)
tree9dacd7eaa05c7957b14389538a30d7ebf7f7e349 /actionpack/lib/action_controller/base/render.rb
parent26ad104e72e2b758815a043341dd83a1b02e8c7f (diff)
parenteb021707f53be46140b55a48e5ef03ed0577a45c (diff)
downloadrails-59653101b8cef7915cb1fb4ad4b84f49ae0881e5.tar.gz
rails-59653101b8cef7915cb1fb4ad4b84f49ae0881e5.tar.bz2
rails-59653101b8cef7915cb1fb4ad4b84f49ae0881e5.zip
Merge commit 'mainstream/master'
Conflicts: actionpack/lib/action_view/helpers/form_helper.rb
Diffstat (limited to 'actionpack/lib/action_controller/base/render.rb')
-rw-r--r--actionpack/lib/action_controller/base/render.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/base/render.rb b/actionpack/lib/action_controller/base/render.rb
index 4286577ec5..cc0d878e01 100644
--- a/actionpack/lib/action_controller/base/render.rb
+++ b/actionpack/lib/action_controller/base/render.rb
@@ -253,7 +253,8 @@ module ActionController
response.content_type ||= Mime::JS
render_for_text(js)
- elsif json = options[:json]
+ elsif options.include?(:json)
+ json = options[:json]
json = ActiveSupport::JSON.encode(json) unless json.respond_to?(:to_str)
json = "#{options[:callback]}(#{json})" unless options[:callback].blank?
response.content_type ||= Mime::JSON