-
Notifications
You must be signed in to change notification settings - Fork 442
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
Bug Fix - Association Guarded Attributes #288
Bug Fix - Association Guarded Attributes #288
Conversation
Whoops. I accidentally closed this earlier. Re-opening... |
I rebased off of the new master, so I could have Travis test with our new test-db, and all related tests passed. I'd say this is safe to merge, but I'll wait for @al-the-x and @jpfuentes2 to weigh in. |
Since this is related to the feature you've outlined in #287, maybe we should slate this for 1.2+ as well? |
We could, but it affects anyone that uses |
@Rican7, can you rebase on "master" and force-push to flatten the history before we merge this? I think this is probably the next safe candidate for merge. |
This is a non-API-breaking change. :)
correctly, while still setting the relationship keys correctly.
@al-the-x You want me to squash 2 commits that change 2 different files? Or just rebase off of master for the new testing? I really should include tests in this fix, actually.. |
@al-the-x @jpfuentes2 any reason to not click the green button? |
Tests would be great. Squashes are appreciated. ;) |
Ohhhhhh yea. I forgot that I said I was gonna write tests. |
(These tests fail without the associated fix)
Tests added. And they pass. :) In other words, this fixes the bug. :P ❓ |
This delay, man. Its killing me. @al-the-x @jpfuentes2 |
I will hit the green button, but only because of:
💤 |
…d-attributes Bug Fix - Association Guarded Attributes
Haha. Thank you sir! |
This fixes the association builder, so that you can build associated models without having to make the associated
foreign_keys
accessible to "mass assigning" (not something that you'd normally want to allow).Example
This Fails
THIS FAILS, with a foreign key exception, as the "create_email" method try's to set the foreign key of the model with "guard_attributes" set to true.