instiki/vendor/rails/activesupport/lib/active_support/json/encoders/object.rb
Jacques Distler 664552ac02 Rails 2.3.3.1
Update to latest Rails.
A little bit of jiggery-pokery is involved, since they
neglected to re-include vendored Rack in this release.
2009-08-04 10:16:03 -05:00

11 lines
244 B
Ruby

class Object
# Dumps object in JSON (JavaScript Object Notation). See www.json.org for more info.
def to_json(options = nil)
ActiveSupport::JSON.encode(as_json(options))
end
def as_json(options = nil)
instance_values
end
end