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

.really_destroy! should not destroy has_many :through records #466

Open
atd opened this issue Mar 8, 2019 · 0 comments · May be fixed by #467
Open

.really_destroy! should not destroy has_many :through records #466

atd opened this issue Mar 8, 2019 · 0 comments · May be fixed by #467
Labels

Comments

@atd
Copy link

atd commented Mar 8, 2019

Despite of counter intuitive, Rails API states that has_many :through records must not be destroyed, but their associations https://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#method-i-has_many

If using with the :through option, the association on the join model must be a belongs_to, and the records which get deleted are the join records, rather than the associated records.

paranoia should have the same behavior

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants