Skip to content

Commit

Permalink
[NEW] +insertInManagedObjectContext: NSParameterAssert's its moc arg.
Browse files Browse the repository at this point in the history
  • Loading branch information
rentzsch committed Oct 17, 2009
1 parent 5f9f9ad commit 1861c92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion templates/machine.m.motemplate
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
@implementation _<$managedObjectClassName$>

+ (id)insertInManagedObjectContext:(NSManagedObjectContext*)moc_ {
return [NSEntityDescription insertNewObjectForEntityForName:@"<$name$>" inManagedObjectContext:moc_];
NSParameterAssert(moc_);
return [NSEntityDescription insertNewObjectForEntityForName:@"<$name$>" inManagedObjectContext:moc_];
}

- (<$managedObjectClassName$>ID*)objectID {
Expand Down

0 comments on commit 1861c92

Please sign in to comment.