|
|
@@ -15,6 +15,7 @@ class ProductAttrConfig < ActiveRecord::Base
|
|
|
showProducts.each {|v| puts v}
|
|
|
return showProducts
|
|
|
end
|
|
|
+ PRODUCT_ENUM = show_products
|
|
|
TYPE_ENUM = [["颜色","color"],["尺码","size"]]
|
|
|
rails_admin do
|
|
|
navigation_label '商品管理'
|
|
|
@@ -30,7 +31,7 @@ class ProductAttrConfig < ActiveRecord::Base
|
|
|
field :id
|
|
|
field :product_id, :enum do
|
|
|
enum do
|
|
|
- show_products
|
|
|
+ PRODUCT_ENUM
|
|
|
end
|
|
|
end
|
|
|
field :product_attr_key
|
|
|
@@ -45,7 +46,7 @@ class ProductAttrConfig < ActiveRecord::Base
|
|
|
field :id
|
|
|
field :product_id, :enum do
|
|
|
enum do
|
|
|
- show_products
|
|
|
+ PRODUCT_ENUM
|
|
|
end
|
|
|
end
|
|
|
field :product_attr_key
|
|
|
@@ -59,7 +60,7 @@ class ProductAttrConfig < ActiveRecord::Base
|
|
|
edit do
|
|
|
field :product_id, :enum do
|
|
|
enum do
|
|
|
- show_products
|
|
|
+ PRODUCT_ENUM
|
|
|
end
|
|
|
end
|
|
|
field :product_attr_key
|