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 WARNING: The behavior of attribute_changed? inside of after callbacks #6

Open
noctivityinc opened this issue Sep 20, 2017 · 1 comment

Comments

@noctivityinc
Copy link

In Rails 5, we are getting the deprecation warning for the way attribute changed is handled, I believe in the notify method inside of observers.rb.

According to the message:

DEPRECATION WARNING: The behavior of `attribute_changed?` 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_change_to_attribute?` instead.
@noctivityinc
Copy link
Author

Here's a good article I found on the issue:

http://blog.toshima.ru/2017/04/06/saved-change-to-attribute.html

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