Sha256: cdc4f64974ea4905e088c25654acb9861f82af8aa3dc09611c13d6b94008675d

Contents?: true

Size: 325 Bytes

Versions: 22

Compression:

Stored size: 325 Bytes

Contents

module Spree
  class PromotionRuleUser < Spree::Base
    belongs_to :promotion_rule, class_name: 'Spree::PromotionRule'
    belongs_to :user, class_name: "::#{Spree.user_class}"

    validates :user, :promotion_rule, presence: true
    validates :user_id, uniqueness: { scope: :promotion_rule_id }, allow_nil: true
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
spree_core-4.10.1 app/models/spree/promotion_rule_user.rb
spree_core-4.10.0 app/models/spree/promotion_rule_user.rb
spree_core-4.9.0 app/models/spree/promotion_rule_user.rb
spree_core-4.8.3 app/models/spree/promotion_rule_user.rb
spree_core-4.8.2 app/models/spree/promotion_rule_user.rb
spree_core-4.7.3 app/models/spree/promotion_rule_user.rb
spree_core-4.6.6 app/models/spree/promotion_rule_user.rb
spree_core-4.5.5 app/models/spree/promotion_rule_user.rb
spree_core-4.5.4 app/models/spree/promotion_rule_user.rb
spree_core-4.6.5 app/models/spree/promotion_rule_user.rb
spree_core-4.7.2 app/models/spree/promotion_rule_user.rb
spree_core-4.7.1 app/models/spree/promotion_rule_user.rb
spree_core-4.6.4 app/models/spree/promotion_rule_user.rb
spree_core-4.7.0 app/models/spree/promotion_rule_user.rb
spree_core-4.6.3 app/models/spree/promotion_rule_user.rb
spree_core-4.6.2 app/models/spree/promotion_rule_user.rb
spree_core-4.6.1 app/models/spree/promotion_rule_user.rb
spree_core-4.6.0 app/models/spree/promotion_rule_user.rb
spree_core-4.5.3 app/models/spree/promotion_rule_user.rb
spree_core-4.5.2 app/models/spree/promotion_rule_user.rb