From 62916ecbbeba72369806fd9b73ae7465aa5be6c1 Mon Sep 17 00:00:00 2001 From: wycats Date: Tue, 20 Apr 2010 22:24:45 -0700 Subject: It should be possible to render :json with options --- actionpack/lib/action_controller/metal/renderers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3