Is there a reason activeresource doesn't parse the default json output properly? Is there an option in activeresource there we can set to match the default output? This was pretty frustrating for me as it seemed like it should "just work" but doesn't. Also it seems like the correct thing here is to just have activeresource recognize root elements properly.
Josh Ferguson On Feb 12, 2009, at 3:20 AM, Frederick Cheung wrote: > > > On 12 Feb 2009, at 08:31, Josh Ferguson wrote: >> >> {"account": {"name" : ...}} >> >> I'm not sure which one is right and which one is wrong. >> >> It's also worth noting that if ActiveResource gets the second type as >> a response, it actually creates an incorrect Account object where >> attributes hash contains the proper Account object. ActiveResource >> appears to require the response listed in the documentation >> although I >> haven't seen that being generated. >> >> Just a note, I removed all my JSON gems just in case there was some >> kind of conflict. >> >> What's going on here, am I just overlooking something? >> > I believe this is tied up with ActiveRecord::Base.include_root_in_json > (which in a newly generated rails app is set to true by an > initializer) > > Fred >> Josh Ferguson >> >>> > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to rubyonrails-core@googlegroups.com To unsubscribe from this group, send email to rubyonrails-core+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en -~----------~----~----~----~------~----~------~--~---