method
as_json
v3.0.0 -
Show latest stable
- Class:
Hash
as_json(options = nil)public
No documentation available.
# File activesupport/lib/active_support/json/encoding.rb, line 194
def as_json(options = nil) #:nodoc:
if options
if attrs = options[:only]
slice(*Array.wrap(attrs))
elsif attrs = options[:except]
except(*Array.wrap(attrs))
else
self
end
else
self
end
end