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

Callbacks due to :dependent options have potentially unintended effect #128

Open
mvz opened this issue Sep 16, 2019 · 0 comments
Open

Callbacks due to :dependent options have potentially unintended effect #128

mvz opened this issue Sep 16, 2019 · 0 comments

Comments

@mvz
Copy link
Contributor

mvz commented Sep 16, 2019

The dependent option for has_many creates a callback that is executed on soft-deletion. However, it may make more sense to execute it on hard-deletion, because otherwise the deletion cannot be undone (unless the action is destroy and the relation is also paranoid).

Options:

  • Move some of these callbacks to the hard-delete stage
  • Warn about these callbacks (i.e., make people not use them)
@mvz mvz changed the title Callbacks due to :dependent options have potentially unintended effect Callbacks due to :dependent options have potentially unintended effect Jan 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant