瀏覽代碼

增加商品属性定义

abiao 5 年之前
父節點
當前提交
ff2f3533d5
共有 1 個文件被更改,包括 0 次插入8 次删除
  1. 0 8
      app/models/product.rb

+ 0 - 8
app/models/product.rb

@@ -24,14 +24,6 @@ class Product < ActiveRecord::Base
     IMG_STORE_PATH = "product"
 
     def v_share_img=file
-        @Size = ProductAttrConfig.where("product_id=? and size_type='size'",self.id).first
-        if !@Size.blank?
-            @productAttrs = ProductAttr.where("attr_key_id=?",@Size.id).order("recommend desc")
-            @productAttrs.each do |attr|
-                a=[attr.name,attr.id]
-                SIZE_ENUM.push(a)
-            end
-        end
         unless file.blank?
         file_name = "#{UUID.new.generate[0...8].downcase}.jpg"
         file_path = "#{IMG_STORE_PATH}/product/share/#{file_name}"