Added non-underscored class name for NSCFBoolean matches in transformation from Boolean to String

This commit is contained in:
Blake Watters
2011-07-27 08:00:15 -04:00
parent 6e87cd5ffd
commit bd29ee038b

View File

@@ -119,7 +119,7 @@ extern NSString* const RKObjectMappingNestingAttributeKeyName;
// Number -> Date
if ([destinationType isSubclassOfClass:[NSDate class]]) {
return [NSDate dateWithTimeIntervalSince1970:[(NSNumber*)value intValue]];
} else if ([sourceType isSubclassOfClass:NSClassFromString(@"__NSCFBoolean")] && [destinationType isSubclassOfClass:[NSString class]]) {
} else if (([sourceType isSubclassOfClass:NSClassFromString(@"__NSCFBoolean")] || [sourceType isSubclassOfClass:NSClassFromString(@"NSCFBoolean")]) && [destinationType isSubclassOfClass:[NSString class]]) {
return ([value boolValue] ? @"true" : @"false");
}
} else if ([destinationType isSubclassOfClass:[NSString class]] && [value respondsToSelector:@selector(stringValue)]) {