소스 검색

商品规格 关联增加限制条件

abiao 5 년 전
부모
커밋
e69a359c7c
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      app/models/product_attr_config.rb

+ 1 - 1
app/models/product_attr_config.rb

@@ -2,7 +2,7 @@ class ProductAttrConfig < ActiveRecord::Base
     has_paper_trail
     self.table_name = 'product_attr_configs'
     belongs_to :product_attr_key, :foreign_key => :attr_key_id
-    belongs_to :product,[{:show_flag=>1}]
+    belongs_to :product,[{@product.show_flag=>1}]
     validates :size_type,:product_id,:product_attr_key,presence:true
     attr_accessor :show_products