remiprev/her — pull request #198 by vic (2013-11-10 03:49:33+00:00)
Title: New can take existing objects

Hey guys,

I've been using her a lot lately. However I've got to find some minor unexpected `her` behaviours
(at least for the common rails user).

One of these was that trying to create an instance with an already instantiated associated object like:

```ruby
organization = Organization.new # somehow it was created or fetched before

user = User.new(organization: organization)
```

was yielding an unpleasent `undefined method delete on instance of Organization` error.

I made a minor change to the association code which builds the instances to check if the given objects
are already a kind of the associated class, in which case we dont need to create a new instance but
just assign the attribute.