instance method
to_json_with_active_support_encoder
Ruby on Rails 4.1.16
Since v4.1.16 Last seen in v4.1.16Signature
to_json_with_active_support_encoder(options = nil)
No documentation comment.
Parameters
-
optionsopt = nil
Source
# File activesupport/lib/active_support/core_ext/object/json.rb, line 31
def to_json_with_active_support_encoder(options = nil)
if options.is_a?(::JSON::State)
# Called from JSON.{generate,dump}, forward it to JSON gem's to_json
self.to_json_without_active_support_encoder(options)
else
# to_json is being invoked directly, use ActiveSupport's encoder
ActiveSupport::JSON.encode(self, options)
end
end
Defined in activesupport/lib/active_support/core_ext/object/json.rb line 31
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in Object