mattgreen/nitron — pull request #8 by macfanatic (2012-06-21 14:09:10+00:00)
Title: Added support for specifying a context during initialization

We ran into a problem when using relationships - I couldn't assign a relationship from a model that was already saved (had a context present) to a model that I was creating (didn't have a context yet). So, to help with this, we added the ability to set a context during initialization.

Samples:

```ruby
consignor = Consignor.create

# will throw an error about mismatching contexts
consignment = Consignment.create consignor: consignor

# saves succesfully, as both are in the same default context from UIApplication delegate
consignment = Consignment.create consignor: consignor, context: true

# fails, as the contexts still mismatch - however, you see how this could be useful
consignment = Consignment.create consignor: consignor, context: NSManagedObjectContext.new
```