Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential fix for issue #546 #548

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

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