Преглед изворни кода

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

abiao пре 5 година
родитељ
комит
6bbd1ef58f
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,[{"show_flag"=>1}]
     validates :size_type,:product_id,:product_attr_key,presence:true
     attr_accessor :show_products