Merge branch 'master' of github.com:twotoasters/RestKit

Conflicts:
	Code/RKModelLoader.m
This commit is contained in:
Blake Watters
2010-03-11 12:24:19 -05:00
5 changed files with 43 additions and 14 deletions

View File

@@ -68,7 +68,11 @@
- (void)processLoadModelInBackground:(RKResponse*)response {
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
id model = response.request.userData;
[_mapper mapModel:model fromString:[response payloadString]];
if (model) {
[_mapper mapModel:model fromString:[response payloadString]];
} else {
model = [_mapper mapFromString:[response payloadString]];
}
[_delegate performSelectorOnMainThread:self.callback withObject:model waitUntilDone:NO];
[pool release];
}