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

Deprecation Warnings in Rails 5.1 #335

Closed
ryanb opened this issue Oct 31, 2018 · 1 comment
Closed

Deprecation Warnings in Rails 5.1 #335

ryanb opened this issue Oct 31, 2018 · 1 comment

Comments

@ryanb
Copy link

ryanb commented Oct 31, 2018

It looks like there are several issues about deprecation warnings which appear to be fixed, but unfortunately mine are not fixed with Closure Tree 7.0.0. I'm running Rails 5.1.6.

DEPRECATION WARNING: The behavior of changes inside of after callbacks will be changing in the next version of Rails. The new return value will reflect the behavior of calling the method after save returned (e.g. the opposite of what it returns now). To maintain the current behavior, use saved_changes instead. (called from update_org_node at ...)

The culprit appears to be this line which is calling changes.

@ryanb
Copy link
Author

ryanb commented Mar 9, 2019

Turns out this isn't a problem with closure_tree, but with how Rails deprecation warning is scoped. I was saving a closure tree model through an after_save callback of a different model. Rails isn't smart enough to not display the deprecation warning when it is an after_save callback of a different model.

@ryanb ryanb closed this as completed Mar 9, 2019
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