diff options
Diffstat (limited to 'actionpack/lib/action_controller/base.rb')
-rwxr-xr-x | actionpack/lib/action_controller/base.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 9a3ab651ac..4630103119 100755 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -826,6 +826,7 @@ module ActionController #:nodoc: render_for_text(xml.respond_to?(:to_xml) ? xml.to_xml : xml, options[:status]) elsif json = options[:json] + json = json.to_json unless json.is_a?(String) json = "#{options[:callback]}(#{json})" unless options[:callback].blank? response.content_type = Mime::JSON render_for_text(json, options[:status]) |