mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-23 20:31:13 +08:00
Align relationshipRoutes to use same filtering mechanics as classRoutes and namedRoutes.
This commit is contained in:
@@ -70,10 +70,12 @@ RKRequestMethod const RKRequestMethodAny = RKRequestMethodInvalid;
|
||||
|
||||
- (NSArray *)relationshipRoutes
|
||||
{
|
||||
NSIndexSet *indexes = [self.routes indexesOfObjectsPassingTest:^BOOL(id obj, NSUInteger idx, BOOL *stop) {
|
||||
return [(RKRoute *)obj isRelationshipRoute];
|
||||
}];
|
||||
return [self.routes objectsAtIndexes:indexes];
|
||||
NSMutableArray *routes = [NSMutableArray array];
|
||||
for (RKRoute *route in self.routes) {
|
||||
if ([route isRelationshipRoute]) [routes addObject:route];
|
||||
}
|
||||
|
||||
return [NSArray arrayWithArray:routes];
|
||||
}
|
||||
|
||||
- (void)addRoute:(RKRoute *)route
|
||||
|
||||
Reference in New Issue
Block a user