Created a record with FactoryBot in a test. This record has 4 associations. All of them created as well, properly. When destroying said record, one of the 4 associations isn’t destroyed despite being configured to be — unless I first reload said record. Feels like a bug. Known?
-
-
Replying to @olivierlacan
Interesting! I haven’t heard of this in FB; first thing I’d encourage you to do is recreate the same records without FB and see if it continues not to destroy one of the associations
2 replies 0 retweets 1 like -
Replying to @joshuaclayton
Confirmed as an AR bug. Or at least something very specifically weird with one of my associations.pic.twitter.com/3magjZ7ayT
1 reply 0 retweets 0 likes -
Replying to @olivierlacan @joshuaclayton
If you haven’t already, I’ve had success with configuring inverse_of on the associations. It seems to give AR more context about your data model and I find strange behavior can sometimes correct itself. Good luck

1 reply 0 retweets 0 likes -
Replying to @arronmabrey @joshuaclayton
AFAIK inverse_of *should* be unnecessary on modern Railw versions now. But maybe
@sgrif knows something I don’t.2 replies 0 retweets 0 likes
`inverse_of` does nothing unless you're also using `autosave` (or something that implies it like `accepts_nested_attributes_for`)
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.