-
Notifications
You must be signed in to change notification settings - Fork 529
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
Fix SystemStackError
when paranoid models have a circular dependent: :destroy
#446
base: core
Are you sure you want to change the base?
Fix SystemStackError
when paranoid models have a circular dependent: :destroy
#446
Conversation
Based on the travis results, a different approach will be needed I think. But the failing tests show that the test case does reproduce the error |
Are there plans to fix it soon? |
Yeah, I'll take another look. Shoutouts to everyone who 👍 and subscribed to this PR. If anyone has an insight, tips or ideas, please feel free to post here. Any help is appreciated |
test/paranoia_test.rb
Outdated
belongs_to_dependent_destroy.destroy | ||
|
||
assert_equal false, has_one_dependent_destroy.reload.deleted_at.nil? | ||
assert_equal false, belongs_to_dependent_destroy.reload.deleted_at.nil? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should just be refute
?
2e3b3ad
to
ffcac89
Compare
note for later: https://docs.travis-ci.com/user/languages/ruby/#bundler-20 |
3a4b295
to
4704336
Compare
Ran into some build errors for this project with the bundler 2.0 release, that's my blocker atm. Working through it |
07ffb12
to
760f3d9
Compare
a46430e
to
9cd1593
Compare
before_install: gem update --system | ||
before_install: | ||
- gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true | ||
- gem install bundler -v '< 2' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
taken from here
Caught up with travisci issues. Ready for review! 🎉 |
…t: :destroy` - Previously, paranoid models with a circular `dependent: :destroy` would recursively try to delete eachother - Add a variable to check if the destroy callback has already been called for that model - Similar fix to rails/rails#18548
6127fb5
to
28a8d64
Compare
dependent: :destroy
would recursively try to delete eachother, causing astack level too deep
error