to_json method in rails 2.0.2 for objects(say user model object with id and name)used to give simple output in the form
{"id":"xyz","name":"hello"}
But while upgrading the rails to 2.3.4 it gives the output as
{"user":{"id":"xyz","name":"hello"}}
This is breaking my most of the frontend code.
Is there way to get the results in the same fashion as in 2.0.2 ???
Looking for a speedy answer from you guys!!