Skip to content

Fix deprecated `attribute_changed?`

The following discussion from !9386 (closed) should be addressed:

  • @jprovaznik started a discussion: (+1 comment)

    This check is used both in before and after callbacks - do we need a separate check (which uses saved_change... for after callback?

Another place is https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/9386/diffs#note_138288244.

There might be more places requiring a change, the reason is that attribute_changed? has been deprecated in 5.1 so before upgrade to 5.2 we should fix all places where we use it.

Edited by Jan Provaznik