Explorar el Código

add balance promotion shop promotion

abiao hace 4 años
padre
commit
939bfae886
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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