Replies: 1 comment
-
Assuming that the foreign key ON DELETE behavior is what you want, it's probably better than using association_dependencies. For one, foreign key ON DELETE will handle all database changes, not just those that occur via the model layer. association_dependencies can do this that foreign_key ON DELETE cannot handle, such as using the :destroy option to call the model level destroy (which can call before/after destroy hooks), so if you need that, that's a possible reason to continue using associaiton_dependencies. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
We're a little late to the game adding foreign key constraints. Our app is built with heavy use of the
association_dependencies
plugin. Is a foreign key constraint with a properly configuredon_delete
better than using theassociation_dependencies
plugin? Is there any reason you'd still useassociation_dependencies
even with the foreign key constrainton_delete
?Beta Was this translation helpful? Give feedback.
All reactions