aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-04-20 22:24:45 -0700
committerwycats <wycats@gmail.com>2010-04-20 22:29:00 -0700
commit62916ecbbeba72369806fd9b73ae7465aa5be6c1 (patch)
tree3ee0a46f888bf5a9876b163256cebb5a4edce3b8 /actionpack/lib
parentd1911a0707eb03758644d600a03c6dcfa14405f0 (diff)
downloadrails-62916ecbbeba72369806fd9b73ae7465aa5be6c1.tar.gz
rails-62916ecbbeba72369806fd9b73ae7465aa5be6c1.tar.bz2
rails-62916ecbbeba72369806fd9b73ae7465aa5be6c1.zip
It should be possible to render :json with options
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/metal/renderers.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/renderers.rb b/actionpack/lib/action_controller/metal/renderers.rb
index aebd71e867..47759aa2fe 100644
--- a/actionpack/lib/action_controller/metal/renderers.rb
+++ b/actionpack/lib/action_controller/metal/renderers.rb
@@ -71,7 +71,7 @@ module ActionController
end
add :json do |json, options|
- json = ActiveSupport::JSON.encode(json) unless json.respond_to?(:to_str)
+ json = ActiveSupport::JSON.encode(json, options) unless json.respond_to?(:to_str)
json = "#{options[:callback]}(#{json})" unless options[:callback].blank?
self.content_type ||= Mime::JSON
self.response_body = json