@sgrif I'm having an issue with AR in rails 5.2-rc1 which I'm not sure is a bug or not. Can you give it a look?https://gist.github.com/zamith/380115037c9cf6f48f1f8ecbdafc8b9e …
-
-
Replying to @zamith
Remove your explicit `inverse_of`s and it should work fine.
1 reply 0 retweets 0 likes -
Replying to @sgrif
If I do that, it only creates one through object, but it does not have the ids of the relations, and then I get a validation error because the relation is not there. I update the gist with the removal of the `inverse_of`s.
1 reply 0 retweets 0 likes -
I am able to do this in two lines, by creating the organization and then the membership via the has many association. But interested in knowing if I'm really doing anything wrong here, and if so, what.
1 reply 0 retweets 0 likes -
Replying to @zamith
Nothing specifically wrong, just general (known) issues with accepts_nested_attributes for (aka autosave: true) and through associations. You might be able to fix it by reversing the order of your associations in your class
1 reply 0 retweets 0 likes -
Replying to @sgrif
What do you mean by reversing the order of the associations?
1 reply 0 retweets 0 likes
Put the second line above the first
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.