Skip to content

Remove deprecated usage of `attribute_changed?`

Heinrich Lee Yu requested to merge 9932-fix-deprecated-attribute_changed into master

What does this MR do?

Changes the deprecated usage of attribute_changed? and related *_was / *_changed? methods in after_save blocks

In Rails 5.2, the behavior of these methods would change when inside after_save.

The new method names for the old behavior are: saved_change_to_attribute?, *_before_last_save and saved_change_to_*?

Does this MR meet the acceptance criteria?

Conformity

Performance and testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • Label as security and @ mention @gitlab-com/gl-security/appsec
  • The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • Security reports checked/validated by a reviewer from the AppSec team

Closes #9932 (closed)

Edited by Coung Ngo

Merge request reports