[Story #11961455] Implements support for sending nested objects back to the remote server for processing:

* Introduce RKObjectMappable#relationshipsToSerialize to define nested relationships to post
* New helper methods for working with relationship serializations.
* Extended Rails router to serialize nested objects according to Rails idioms
This commit is contained in:
Peter Marks
2011-04-01 15:30:33 -07:00
committed by Blake Watters
parent f3036a6a13
commit 35171084d1
10 changed files with 202 additions and 6 deletions

View File

@@ -15,6 +15,10 @@
return nil;
}
+ (NSArray*)relationshipsToSerialize {
return [NSArray array];
}
+ (NSDictionary*)elementToRelationshipMappings {
return [NSDictionary dictionary];
}
@@ -27,4 +31,8 @@
return RKObjectMappableGetPropertiesByElement(self);
}
- (NSDictionary*)relationshipsForSerialization {
return RKObjectMappableGetRelationshipsByElement(self);
}
@end