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