Override as_json or to_json model class name
- by Jack
I'd like to modify the classname when calling to_json on an AR model.
i.e.
Book.first.to_json
#=> "{\"book\":{\"created_at\":\"2010-03-23
Book.first.to_json(:root => 'libro')
#=> "{\"libro\":{\"created_at\":\"2010-03-23
Is there an option to do this?