instance method
encode
Ruby on Rails 4.0.13
Since v3.0.20 Last seen in v4.0.13Signature
encode(value, use_options = true)
No documentation comment.
Parameters
-
valuereq -
use_optionsopt = true
Source
# File activesupport/lib/active_support/json/encoding.rb, line 48
def encode(value, use_options = true)
check_for_circular_references(value) do
jsonified = use_options ? value.as_json(options_for(value)) : value.as_json
jsonified.encode_json(self)
end
end
Defined in activesupport/lib/active_support/json/encoding.rb line 48
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::JSON::Encoding::Encoder