instance method
options_for
Ruby on Rails 4.0.13
Since v3.0.20 Last seen in v4.0.13Signature
options_for(value)
No documentation comment.
Parameters
-
valuereq
Source
# File activesupport/lib/active_support/json/encoding.rb, line 62
def options_for(value)
if value.is_a?(Array) || value.is_a?(Hash)
# hashes and arrays need to get encoder in the options, so that
# they can detect circular references.
options.merge(:encoder => self)
else
options.dup
end
end
Defined in activesupport/lib/active_support/json/encoding.rb line 62
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::JSON::Encoding::Encoder