Skip to content

Commit

Permalink
Merge pull request RestKit#1974 from pawelkw/documentation_fix
Browse files Browse the repository at this point in the history
Fixed two typos in RKManagedObjectStore's documentation code example.
  • Loading branch information
segiddins committed Jul 17, 2014
2 parents 67fb420 + b24fe91 commit 40d5be0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Code/CoreData/RKManagedObjectStore.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
As an alternative to resetting the persistent store, you may wish to consider simply deleting all managed objects out of the managed object context. If your data set is not very large, this can be a performant operation and is significantly easier to implement correctly. An example implementation for truncating all managed objects from the store is provided below:
NSBlockOpertation *operation = [NSBlockOperation blockOperationWithBlock:^{
NSBlockOperation *operation = [NSBlockOperation blockOperationWithBlock:^{
NSManagedObjectContext *managedObjectContext = [RKManagedObjectStore defaultStore].persistentStoreManagedObjectContext;
[managedObjectContext performBlockAndWait:^{
NSError *error = nil;
Expand All @@ -162,7 +162,7 @@
NSArray *objects = [managedObjectContext executeFetchRequest:fetchRequest error:&error];
if (! objects) RKLogWarning(@"Failed execution of fetch request %@: %@", fetchRequest, error);
for (NSManagedObject *managedObject in objects) {
[managedObjectContext deleteObject:managedObjectContext];
[managedObjectContext deleteObject:managedObject];
}
}
Expand Down

0 comments on commit 40d5be0

Please sign in to comment.