Sha256: bac999b5672c5dd009e17329844684ee8f77967483d3c6c4d3e8e09b8bfa88a0

Contents?: true

Size: 415 Bytes

Versions: 29

Compression:

Stored size: 415 Bytes

Contents

module Spree
  class Classification < Spree::Base
    self.table_name = 'spree_products_taxons'
    acts_as_list scope: :taxon
    belongs_to :product, class_name: "Spree::Product", inverse_of: :classifications
    belongs_to :taxon, class_name: "Spree::Taxon", inverse_of: :classifications, touch: true

    # For #3494
    validates_uniqueness_of :taxon_id, scope: :product_id, message: :already_linked
  end
end

Version data entries

29 entries across 29 versions & 2 rubygems

Version Path
solidus_core-1.1.4 app/models/spree/classification.rb
solidus_core-1.0.7 app/models/spree/classification.rb
solidus_core-1.0.6 app/models/spree/classification.rb
solidus_core-1.1.3 app/models/spree/classification.rb
solidus_core-1.0.5 app/models/spree/classification.rb
solidus_core-1.0.4 app/models/spree/classification.rb
solidus_core-1.1.2 app/models/spree/classification.rb
solidus_core-1.0.3 app/models/spree/classification.rb
solidus_core-1.1.1 app/models/spree/classification.rb
solidus_core-1.1.0 app/models/spree/classification.rb
solidus_core-1.1.0.pre2 app/models/spree/classification.rb
solidus_core-1.1.0.pre1 app/models/spree/classification.rb
solidus_core-1.1.0.beta1 app/models/spree/classification.rb
solidus_core-1.0.2 app/models/spree/classification.rb
solidus_core-1.0.1 app/models/spree/classification.rb
solidus_core-1.0.0 app/models/spree/classification.rb
solidus_core-1.0.0.rc2 app/models/spree/classification.rb
solidus_core-1.0.0.rc1 app/models/spree/classification.rb
solidus_core-1.0.0.pre3 app/models/spree/classification.rb
solidus_core-1.0.0.pre2 app/models/spree/classification.rb