Sha256: 6f928ded820b538fa5d5f4ad0189e7aa09ec402790c36696b84e1eea9d32569e

Contents?: true

Size: 223 Bytes

Versions: 10

Compression:

Stored size: 223 Bytes

Contents

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

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

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
hyrax-1.1.1 app/models/concerns/hyrax/works/trophies.rb
hyrax-1.1.0 app/models/concerns/hyrax/works/trophies.rb
hyrax-1.0.5 app/models/concerns/hyrax/works/trophies.rb
hyrax-1.0.4 app/models/concerns/hyrax/works/trophies.rb
hyrax-1.0.3 app/models/concerns/hyrax/works/trophies.rb
hyrax-1.0.2 app/models/concerns/hyrax/works/trophies.rb
hyrax-1.0.1 app/models/concerns/hyrax/works/trophies.rb
hyrax-1.0.0.rc2 app/models/concerns/hyrax/works/trophies.rb
hyrax-1.0.0.rc1 app/models/concerns/hyrax/works/trophies.rb
test_hyrax-0.0.1.alpha app/models/concerns/hyrax/works/trophies.rb