nathanvda/cocoon — pull request #247 by richseviora (2014-12-11 19:55:19+00:00)
Title: README Clarification for has_one

A small change to the README save others some troubleshooting time. For reasons too complicated to explain here I need to allow users to delete and create a record with a 'has_one' association.

The destruction of the associated object is expected as per has_one#association= documentation (excerpted):

Assigns the associate object, extracts the primary key, sets it as the foreign key, and saves the associate object. To avoid database inconsistencies, permanently deletes an existing associated object when assigning a new one, even if the new one isn't saved to database.