소스 검색

add balance promotion shop promotion

abiao 4 년 전
부모
커밋
939bfae886
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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