abiao лет назад: 5
Родитель
Сommit
6b9f49a33a
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      app/models/product.rb

+ 1 - 1
app/models/product.rb

@@ -11,7 +11,7 @@ class Product < ActiveRecord::Base
 
     SIZE_ENUM =  []
     def get_size_enum
-        @Size = ProductAttrConfig.where("product_id=? and type='size'",self.id).first
+        @Size = ProductAttrConfig.where("product_id=? and size_type='size'",self.id).first
         @productAttrs = ProductAttr.where("attr_key_id=?",@Size.id).order("recommend desc")
         @productAttrs.each do |attr|
             a=[attr.name,attr.id]