Kaynağa Gözat

add balance promotion shop promotion

abiao 4 yıl önce
ebeveyn
işleme
939bfae886
1 değiştirilmiş dosya ile 1 ekleme ve 1 silme
  1. 1 1
      app/models/promotion.rb

+ 1 - 1
app/models/promotion.rb

@@ -2,7 +2,7 @@ class Promotion < ActiveRecord::Base
     has_paper_trail
     self.table_name = "promotions"
     validates :begin_time,:end_time,:name,:order_type, presence: true
-    has_and_belongs_to_many :depart_record, :foreign_key => :depart
+    has_and_belongs_to_many :depart_record
 
     def prodcut1
       prd1 = Product.where("id = ?", self.prod1).first