blob: 57603bd1e60de429bc532ee17f1b8947992f7e70 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
|
require 'active_support/core_ext/object/instance_variables'
class Object
# Dumps object in JSON (JavaScript Object Notation). See www.json.org for more info.
def rails_to_json(options = nil)
ActiveSupport::JSON.encode(instance_values, options)
end
alias to_json rails_to_json
end
|