aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/json/encoders/object.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/json/encoders/object.rb')
-rw-r--r--activesupport/lib/active_support/json/encoders/object.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/activesupport/lib/active_support/json/encoders/object.rb b/activesupport/lib/active_support/json/encoders/object.rb
index 51852e17cb..6da0d1d1c1 100644
--- a/activesupport/lib/active_support/json/encoders/object.rb
+++ b/activesupport/lib/active_support/json/encoders/object.rb
@@ -1,10 +1,6 @@
class Object
# Dumps object in JSON (JavaScript Object Notation). See www.json.org for more info.
- #
- # Account.find(1).to_json
- # => "{attributes: {username: \"foo\", id: \"1\", password: \"bar\"}}"
- #
- def to_json
- ActiveSupport::JSON.encode(instance_values)
+ def to_json(options = {})
+ ActiveSupport::JSON.encode(instance_values, options)
end
end