Browse Source

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

abiao 5 years ago
parent
commit
e69a359c7c
1 changed files with 1 additions and 1 deletions
  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