Method: ActiveSupport::JSON.encode
- Defined in:
- lib/active_support/json/encoding.rb
.encode(value, options = {}) ⇒ Object
Converts a Ruby object into a JSON string.
19 20 21 22 23 |
# File 'lib/active_support/json/encoding.rb', line 19 def encode(value, = {}) raise_on_circular_reference(value) do value.send(:to_json, ) end end |