@@ -5,6 +5,8 @@ class BalancePromotion < ActiveRecord::Base
validates :begin_time,:end_time,:name,:depart,:min_total,:max_total, presence: true
validate :product_validation
+ attr_accessor :get_depart_enum
+
def product_validation
if self.send_prod1 > 0
prd1 = Product.where("id = ?", self.send_prod1).first