Open ShanaLMoore opened 9 months ago
work resource models are no longer a an ActiveRecord object. Any callbacks on the normal work model needs to be replicated for its complimentary resource model, using the listener pattern.
GBH
https://dry-rb.org/gems/dry-events/0.2/#event-listeners
from collection.rb, and needs to be added to pcdm_collection_decorator.rb
collection.rb
pcdm_collection_decorator.rb
after_update :remove_featured, if: proc { |collection| collection.private? } after_destroy :remove_featured
https://github.com/samvera-labs/transitioning-to-valkyrie-workshop#legacy-callbacks
work resource models are no longer a an ActiveRecord object. Any callbacks on the normal work model needs to be replicated for its complimentary resource model, using the listener pattern.
Examples
GBH
Notes
https://dry-rb.org/gems/dry-events/0.2/#event-listeners