Przeglądaj źródła

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

abiao 5 lat temu
rodzic
commit
e69a359c7c
1 zmienionych plików z 1 dodań i 1 usunięć
  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