Sha256: 4fbce474105c2c19b40866057a655c288eed646ef94d820393516089a14d3081
Contents?: true
Size: 520 Bytes
Versions: 48
Compression:
Stored size: 520 Bytes
Contents
module Hyrax module Actors # Responsible for removing trophies related to the given curation concern. class CleanupTrophiesActor < Hyrax::Actors::AbstractActor # @param [Hyrax::Actors::Environment] env # @return [Boolean] true if destroy was successful def destroy(env) cleanup_trophies(env) next_actor.destroy(env) end private def cleanup_trophies(env) Trophy.where(work_id: env.curation_concern.id).destroy_all end end end end
Version data entries
48 entries across 48 versions & 1 rubygems