Skip to content

Conversation

louismrose
Copy link
Contributor

As discussed in #546, I was seeing an issue whereby foreign key attributes where not being set during a create_association for a belongs_to.

This is one potential fix: it overrides the append_record_to_associate (which was shared for all types of relationship) for belongs to relationships such that the foreign key is set on the associate, and not on the new record.

@koenpunt
Copy link
Collaborator

koenpunt commented Jul 9, 2016

I think your fix is fine, although still strange to create the owner from the associate. Like children creating their parents.
And that all the tests still pass amazes me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants