mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-23 20:31:13 +08:00
[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:
committed by
Blake Watters
parent
f3036a6a13
commit
35171084d1
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user