diff options
Diffstat (limited to 'activesupport/lib/active_support/json/encoders/hash.rb')
-rw-r--r-- | activesupport/lib/active_support/json/encoders/hash.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/json/encoders/hash.rb b/activesupport/lib/active_support/json/encoders/hash.rb index 5aec547b9b..4771484843 100644 --- a/activesupport/lib/active_support/json/encoders/hash.rb +++ b/activesupport/lib/active_support/json/encoders/hash.rb @@ -31,7 +31,7 @@ class Hash # would pass the <tt>:include => :posts</tt> option to <tt>users</tt>, # allowing the posts association in the User model to be converted to JSON # as well. - def rails_to_json(options = nil) #:nodoc: + def rails_to_json(options = nil, *args) #:nodoc: hash_keys = self.keys if options @@ -44,7 +44,7 @@ class Hash result = '{' result << hash_keys.map do |key| - "#{ActiveSupport::JSON.encode(key.to_s)}:#{ActiveSupport::JSON.encode(self[key], options)}" + "#{ActiveSupport::JSON.encode(key.to_s)}:#{ActiveSupport::JSON.encode(self[key], options, *args)}" end * ',' result << '}' end |