blob: 51852e17cb2fb31a26732944651adb2434d3dcb1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
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)
end
end
|