samvera / active_fedora

A Rails interface to the Fedora repository, akin to ActiveModel
Other
54 stars 63 forks source link

Deprecate `#clear_changed_attributes` #1406

Closed no-reply closed 5 years ago

no-reply commented 5 years ago

This method can be replaced by ActiveModel::Dirty#changes_applied, which is more resiliant to changing ActiveModel and Rails behavior.

However, since we call it in a callback, and downstream users may be relying on that fact to trigger calls to their overrides, we can't avoid calling it locally until a 14.0.0 release.

no-reply commented 5 years ago

As noted, this method is hit by a callback. We have a few options:

cjcolvar commented 5 years ago

Option 1 seems like it might overflow logs in CI. Option 2 seems better if it isn't too much work. For option 3, do we know if anyone has actually overridden this method? If not, then maybe the release notes are fine enough?

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.1%) to 89.482% when pulling 7edc40e3882804dbcf1179e2ee9bd6fb77e90620 on deprecate into 2b75d5ec94afc55fe4dafe01e55a27a11a466d79 on 13.x-stable.

no-reply commented 5 years ago

i think the proposed approach works, and may avoid the need to bump the major version #1405