Sha256: 5cdbbb42eab2dd32bc26c3ecb5b822cedfaf4689f4453d7c9df7c3c3cb57baba

Contents?: true

Size: 223 Bytes

Versions: 8

Compression:

Stored size: 223 Bytes

Contents

module Sufia::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

8 entries across 8 versions & 1 rubygems

Version Path
sufia-7.4.1 app/models/concerns/sufia/works/trophies.rb
sufia-7.4.0 app/models/concerns/sufia/works/trophies.rb
sufia-7.3.1 app/models/concerns/sufia/works/trophies.rb
sufia-7.3.0 app/models/concerns/sufia/works/trophies.rb
sufia-7.3.0.rc3 app/models/concerns/sufia/works/trophies.rb
sufia-7.3.0.rc2 app/models/concerns/sufia/works/trophies.rb
sufia-7.3.0.rc1 app/models/concerns/sufia/works/trophies.rb
sufia-7.2.0 app/models/concerns/sufia/works/trophies.rb