Explorar o código

add balance promotion shop promotion

abiao %!s(int64=4) %!d(string=hai) anos
pai
achega
939bfae886
Modificáronse 1 ficheiros con 1 adicións e 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