Sha256: c8aa157c0eb3c1ee1944c8c37df3eeb3f93c649ca163b2f507545e846b9f2bed
Contents?: true
Size: 544 Bytes
Versions: 29
Compression:
Stored size: 544 Bytes
Contents
# frozen_string_literal: true 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
29 entries across 29 versions & 1 rubygems