{"nickname": "",
"lastname": "Budin",
"id": 35,
"gender": "male",
"firstname": "Nat",
"created_at": "2007-03-11T17:31:18Z",
"updated_at": "2008-08-22T20:13:45Z"}
But now instead, it returns:
{"user":
{"nickname": "",
"lastname": "Budin",
"id": 35,
"gender": "male",
"firstname": "Nat",
"created_at": "2007-03-11T17:31:18Z",
"updated_at": "2008-08-22T20:13:45Z"}}
Jester isn't designed to understand this format. I managed to hack
the _attributesFromJSON method to work with this - basically, adding
another case where the attribute name is the same as the class name -
but I'm not sure it's the right approach. On the Rails side, you can
instead do user.attributes.to_json instead of user.to_json.
I don't particularly love the Jester-side hack that I did, but perhaps
there is a better way to do the same thing without having to modify
the Rails code...?
Nat
-- Eric