mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-05-15 09:06:52 +08:00
The RKRailsRouter no longer sends params with delete requests.
The RKObjectLoader will now clean up deleted objects inside of processLoadModelsInBackground:
This commit is contained in:
@@ -169,8 +169,12 @@
|
||||
if (self.targetObject) {
|
||||
if (_targetObjectID) {
|
||||
NSManagedObject* backgroundThreadModel = [self.managedObjectStore objectWithID:_targetObjectID];
|
||||
[_mapper mapObject:backgroundThreadModel fromString:[response bodyAsString]];
|
||||
results = [NSArray arrayWithObject:backgroundThreadModel];
|
||||
if (self.method == RKRequestMethodDELETE) {
|
||||
[[objectStore managedObjectContext] deleteObject:backgroundThreadModel];
|
||||
} else {
|
||||
[_mapper mapObject:backgroundThreadModel fromString:[response bodyAsString]];
|
||||
results = [NSArray arrayWithObject:backgroundThreadModel];
|
||||
}
|
||||
} else {
|
||||
[_mapper mapObject:self.targetObject fromString:[response bodyAsString]];
|
||||
results = [NSArray arrayWithObject:self.targetObject];
|
||||
|
||||
Reference in New Issue
Block a user