|
|
@@ -9,7 +9,7 @@ class Product < ActiveRecord::Base
|
|
|
TYPE_ENUM = [["直营","direct_sale"]]
|
|
|
#["代销","user_sale"]
|
|
|
|
|
|
- SIZE_ENUM = [["大码",1]]
|
|
|
+ SIZE_ENUM = []
|
|
|
def get_size_enum
|
|
|
@Size = ProductAttrConfig.where("product_id=? and type='size'",self.id).first
|
|
|
@productAttrs = ProductAttr.where("attr_key_id=?",@Size.id).order("recommend desc")
|
|
|
@@ -105,6 +105,7 @@ class Product < ActiveRecord::Base
|
|
|
field :is_only_new
|
|
|
field :video_state
|
|
|
field :size_id, :enum do
|
|
|
+ get_size_enum
|
|
|
enum do
|
|
|
SIZE_ENUM
|
|
|
end
|