search for: json_us

Displaying 1 result from an estimated 1 matches for "json_us".

Did you mean: json_t
2010 May 01
0
Add custom root option to AR JSON Serializer
Hi, In short: I can do following: user.to_xml(:root => "xml_user" ) But not following: user.to_json(:root => "json_user") JSON serializer for AR doesn''t allow us to specify "root" option unlike XML serializer. JSON serializer always uses model name as the root if class attribute include_root_in_json is set to true. I''ve added a patch which allows JSON serializer to accepts custom...