Pārlūkot izejas kodu

增加商品属性定义

abiao 5 gadi atpakaļ
vecāks
revīzija
6b9f49a33a
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  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]