diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-04-30 16:45:39 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-04-30 16:45:39 -0700 |
commit | 6ae839bf488504cc2d3523700d5a49db1a89c76d (patch) | |
tree | a0b81b6a3b54aef44acb77748360c6bfda889f7c /actionpack/lib/action_controller/base | |
parent | e59835bd0934a7458b71b13bf65786c8484905bd (diff) | |
parent | f0b9e2861943d32ca73a53ab5fb6f86d10c89b04 (diff) | |
download | rails-6ae839bf488504cc2d3523700d5a49db1a89c76d.tar.gz rails-6ae839bf488504cc2d3523700d5a49db1a89c76d.tar.bz2 rails-6ae839bf488504cc2d3523700d5a49db1a89c76d.zip |
Merge branch 'master' of git@github.com:rails/rails
Diffstat (limited to 'actionpack/lib/action_controller/base')
-rw-r--r-- | actionpack/lib/action_controller/base/render.rb | 3 |
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 |