Sha256: ce848e6e6e340afe5250663fcb27f2210c49d56faa5c1f35d6b162552da6e6c8

Contents?: true

Size: 217 Bytes

Versions: 8

Compression:

Stored size: 217 Bytes

Contents

module Sufia::Works
  module Trophies
    extend ActiveSupport::Concern
    included do
      before_destroy :cleanup_trophies
    end

    def cleanup_trophies
      Trophy.destroy_all(work_id: id)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
sufia-7.1.0 app/models/concerns/sufia/works/trophies.rb
sufia-7.0.0 app/models/concerns/sufia/works/trophies.rb
sufia-7.0.0.rc2 app/models/concerns/sufia/works/trophies.rb
sufia-7.0.0.rc1 app/models/concerns/sufia/works/trophies.rb
sufia-7.0.0.beta4 app/models/concerns/sufia/works/trophies.rb
sufia-7.0.0.beta3 app/models/concerns/sufia/works/trophies.rb
sufia-7.0.0.beta2 app/models/concerns/sufia/works/trophies.rb
sufia-7.0.0.beta1 app/models/concerns/sufia/works/trophies.rb