Sha256: eba655521aaf5a8303581e1cc26759e1f560725eb3536b496495a65b6398999a

Contents?: true

Size: 428 Bytes

Versions: 15

Compression:

Stored size: 428 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, touch: true
    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

15 entries across 15 versions & 1 rubygems

Version Path
spree_core-3.0.10 app/models/spree/classification.rb
spree_core-3.0.9 app/models/spree/classification.rb
spree_core-3.0.8 app/models/spree/classification.rb
spree_core-3.0.7 app/models/spree/classification.rb
spree_core-3.0.6.1 app/models/spree/classification.rb
spree_core-3.0.6 app/models/spree/classification.rb
spree_core-3.0.5 app/models/spree/classification.rb
spree_core-3.0.4 app/models/spree/classification.rb
spree_core-2.4.10 app/models/spree/classification.rb
spree_core-3.0.3 app/models/spree/classification.rb
spree_core-2.4.9 app/models/spree/classification.rb
spree_core-3.0.2 app/models/spree/classification.rb
spree_core-2.4.8 app/models/spree/classification.rb
spree_core-3.0.1 app/models/spree/classification.rb
spree_core-2.4.7 app/models/spree/classification.rb