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:
Jeremy Ellison
2011-01-06 15:47:09 -05:00
parent b31e6426a5
commit f690fa19f3
2 changed files with 11 additions and 2 deletions

View File

@@ -44,6 +44,11 @@
#pragma mark RKRouter
- (NSObject<RKRequestSerializable>*)serializationForObject:(NSObject<RKObjectMappable>*)object method:(RKRequestMethod)method {
// Rails does not send parameters for delete requests.
if (method == RKRequestMethodDELETE) {
return nil;
}
NSDictionary* elementsAndProperties = [self elementNamesAndPropertyValuesForObject:object];
NSMutableDictionary* resourceParams = [NSMutableDictionary dictionaryWithCapacity:[elementsAndProperties count]];
NSString* modelName = [_classToModelMappings objectForKey:[object class]];