samvera / active_fedora

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

Deprecate `#clear_changed_attributes` #1407

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 continue calling it in the case that it is both: not the base definition, and not the version overridden in ListSource.

Callers to those two versions will see deprecation warnings, and users of the callback will also see deprecation warnings. Their local behavior may be in conflict with Rails 6.0.

no-reply commented 5 years ago

Note that this patch won't quite be backwards compatible for monkey patches on ListSource.

If you're monkey patching ListSource, you can jump in a lake.

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.09%) to 89.494% when pulling 229c146851952f52e7c1b5f5051fbe0bbecf2866 on deprecate-dont-remove into e6a5f1a202f73676256bd1f41bd2f5f041aba48a on master.