|
@@ -7,12 +7,14 @@ class ProductAttrConfig < ActiveRecord::Base
|
|
|
|
|
|
|
|
|
|
|
|
|
def PRODUCT_ENUM
|
|
def PRODUCT_ENUM
|
|
|
- showProducts=[0,"初始值"]
|
|
|
|
|
|
|
+ showProducts=["1","初始值"]
|
|
|
|
|
+=begin
|
|
|
@products = Product.where("show_flag=1").order("created_at desc")
|
|
@products = Product.where("show_flag=1").order("created_at desc")
|
|
|
@products.each do |pd|
|
|
@products.each do |pd|
|
|
|
a=[pd.name,pd.id]
|
|
a=[pd.name,pd.id]
|
|
|
showProducts.push(a)
|
|
showProducts.push(a)
|
|
|
end
|
|
end
|
|
|
|
|
+=end
|
|
|
#showProducts.each {|v| puts v}
|
|
#showProducts.each {|v| puts v}
|
|
|
return showProducts
|
|
return showProducts
|
|
|
end
|
|
end
|