diff options
author | John Firebaugh <john_firebaugh@us.ibm.com> | 2011-04-01 12:14:53 -0700 |
---|---|---|
committer | John Firebaugh <john_firebaugh@us.ibm.com> | 2011-04-01 12:16:54 -0700 |
commit | 080e2a7abf8314338a41f72821703b23c86b3c45 (patch) | |
tree | 1c7f4631ababecc5c2db147ef2706cf4d7297e06 /activesupport/lib | |
parent | 0eb6e5e270c0a1114fdafe4a8daa35ee88e176e3 (diff) | |
download | rails-080e2a7abf8314338a41f72821703b23c86b3c45.tar.gz rails-080e2a7abf8314338a41f72821703b23c86b3c45.tar.bz2 rails-080e2a7abf8314338a41f72821703b23c86b3c45.zip |
Enumerable should pass encoding options to children in #as_json/#to_json.
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/json/encoding.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/json/encoding.rb b/activesupport/lib/active_support/json/encoding.rb index 82b8a7e148..1fafc36ee8 100644 --- a/activesupport/lib/active_support/json/encoding.rb +++ b/activesupport/lib/active_support/json/encoding.rb @@ -205,7 +205,9 @@ class Regexp end module Enumerable - def as_json(options = nil) to_a end #:nodoc: + def as_json(options = nil) #:nodoc: + to_a.as_json(options) + end end class Array |