Skip to content
Browse files

It should be possible to render :json with options

  • Loading branch information...
1 parent d1911a0 commit 62916ecbbeba72369806fd9b73ae7465aa5be6c1 @wycats wycats committed Apr 20, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/action_controller/metal/renderers.rb
View
2 actionpack/lib/action_controller/metal/renderers.rb
@@ -71,7 +71,7 @@ def self._write_render_options
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

0 comments on commit 62916ec

Please sign in to comment.
Something went wrong with that request. Please try again.