In Rails 3.0.8 the json contains a root element with your model name. For example my Location model.
[
{
location: {
city: San Diego
name: Mission Valley YMCA Krause Family Skatepark
pads_required: 0
country: United States
And the mapping provider looked directly for the location object.
RKObjectMapping* locationMapping = [RKObjectMapping mappingForClass:[RKLocation class]];
[locationMapping mapKeyPath:@"id" toAttribute:@"locationId"];
...
[objectManager.mappingProvider setMapping:locationMapping forKeyPath:@"location"];
Now when you upgrade to rails 3.1.0 the root node "location" is now removed by default and I'm not sure how to configure the mapping provider without it? I tried nil and looked for alternative methods but was unsuccessful.
Do you know how to map this? Please help!
[
{
city: San Diego
name: Mission Valley YMCA Krause Family Skatepark
pads_required: 0
country: United States