aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/json/encoders/symbol.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2007-10-04 03:28:42 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2007-10-04 03:28:42 +0000
commitb1968708e12972515fdc8eefdcaff95edbebc76b (patch)
tree93c179fda5d5428bb12bbdb4332f4450d523f77c /activesupport/lib/active_support/json/encoders/symbol.rb
parenta30a1a9d5f06f404421d65393bcf9d73885789cb (diff)
downloadrails-b1968708e12972515fdc8eefdcaff95edbebc76b.tar.gz
rails-b1968708e12972515fdc8eefdcaff95edbebc76b.tar.bz2
rails-b1968708e12972515fdc8eefdcaff95edbebc76b.zip
Hash#to_json takes :only or :except options to specific or omit certain hash keys. Enumerable#to_json passes through its options to each element. Closes #9751.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7736 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/json/encoders/symbol.rb')
-rw-r--r--activesupport/lib/active_support/json/encoders/symbol.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/json/encoders/symbol.rb b/activesupport/lib/active_support/json/encoders/symbol.rb
index 57291e5448..485112f97c 100644
--- a/activesupport/lib/active_support/json/encoders/symbol.rb
+++ b/activesupport/lib/active_support/json/encoders/symbol.rb
@@ -1,5 +1,5 @@
class Symbol
- def to_json #:nodoc:
- ActiveSupport::JSON.encode(to_s)
+ def to_json(options = {}) #:nodoc:
+ ActiveSupport::JSON.encode(to_s, options)
end
end