samvera / active_fedora

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

Don't track changes or attempt to persist server-managed properties on file metadata nodes #1464

Closed cjcolvar closed 2 years ago

cjcolvar commented 2 years ago

Upstream port of monkey-patch in Hyrax required for wings (https://github.com/samvera/hyrax/pull/5320)

This PR introduces an attribute on properties in the metadata schemas called :server_managed. When this attribute is set to true on a property it allows a value to be set via the generated setter but the change isn't tracked by ActiveModel::Dirty and subsequently isn't sent to the server as part of the changed values when saving.