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 6bd8051 commit 5ff2039
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 5ff2039

Please sign in to comment.