aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/object/to_json.rb
Commit message (Collapse)AuthorAgeFilesLines
* Set the default options value for as_json in the encoder object.José Valim2011-09-301-1/+1
|
* Fixing `as_json` method for ActiveRecord models.Nicolás Hock Isaza2011-09-291-1/+1
| | | | | | | | | | | | | When you've got an AR Model and you override the `as_json` method, you should be able to add default options to the renderer, like this: class User < ActiveRecord::Base def as_json(options = {}) super(options.merge(:except => [:password_digest])) end end This was not possible before this commit. See the added test case.
* AS json refactor, move to_json implementation to core_ext and a cleanup a ↵Santiago Pastorino2010-07-011-0/+19
bit the code