Quellcode durchsuchen

增加商品属性定义

abiao vor 5 Jahren
Ursprung
Commit
71f9cb960b
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      app/models/product.rb

+ 1 - 1
app/models/product.rb

@@ -24,7 +24,7 @@ class Product < ActiveRecord::Base
         end
         COLOR_ENUM.clear
         if COLOR_ENUM.length==0
-            @Color = ProductAttrConfig.where("product_id=? and size_type='color'",self.id).first
+            @Color = ProductAttrConfig.where("product_id=? and size_types='color'",self.id).first
             if !@Color.blank?
                 @productColorAttrs = ProductAttr.where("attr_key_id=?",@Color.id).order("recommend desc")
                 @productColorAttrs.each do |color_attr|