scientist-softserv / hykuup_knapsack

container project for the Hyku Up deploy of Hyku
Apache License 2.0
1 stars 0 forks source link

Implement listeners for Active Record callbacks #99

Open ShanaLMoore opened 9 months ago

ShanaLMoore commented 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.

Examples

GBH

Notes

https://dry-rb.org/gems/dry-events/0.2/#event-listeners

laritakr commented 9 months ago

Remove Featured

from collection.rb, and needs to be added to pcdm_collection_decorator.rb

  after_update :remove_featured, if: proc { |collection| collection.private? }
  after_destroy :remove_featured
ShanaLMoore commented 8 months ago

https://github.com/samvera-labs/transitioning-to-valkyrie-workshop#legacy-callbacks