Added ability to overload the params on object loaders composed by the object manager. fixes #352

This commit is contained in:
Blake Watters
2011-09-19 19:54:58 -04:00
parent e33d9e519a
commit 4b287a5b24
2 changed files with 22 additions and 1 deletions

View File

@@ -297,7 +297,7 @@
// Invoked just before request hits the network
- (BOOL)prepareURLRequest {
if (self.sourceObject && (self.method == RKRequestMethodPOST || self.method == RKRequestMethodPUT)) {
if ((self.sourceObject && self.params == nil) && (self.method == RKRequestMethodPOST || self.method == RKRequestMethodPUT)) {
NSAssert(self.serializationMapping, @"Cannot send an object to the remote");
RKLogDebug(@"POST or PUT request for source object %@, serializing to MIME Type %@ for transport...", self.sourceObject, self.serializationMIMEType);
RKObjectSerializer* serializer = [RKObjectSerializer serializerWithObject:self.sourceObject mapping:self.serializationMapping];