|
|
@@ -2,7 +2,6 @@ class ProductAttr < ActiveRecord::Base
|
|
|
has_paper_trail
|
|
|
self.table_name = 'product_attrs'
|
|
|
has_ancestry
|
|
|
- has_many :product_attr_keys, :foreign_key => :attr_key_id
|
|
|
validates :name,presence:true
|
|
|
|
|
|
rails_admin do
|
|
|
@@ -15,22 +14,22 @@ class ProductAttr < ActiveRecord::Base
|
|
|
})
|
|
|
|
|
|
list do
|
|
|
- filters [:name,:product_attr_key]
|
|
|
+ filters [:name,:attr_key_id]
|
|
|
field :id
|
|
|
- field :product_attr_key
|
|
|
+ field :attr_key_id
|
|
|
field :name
|
|
|
field :recommend
|
|
|
end
|
|
|
|
|
|
show do
|
|
|
field :id
|
|
|
- field :product_attr_key
|
|
|
+ field :attr_key_id
|
|
|
field :name
|
|
|
field :recommend
|
|
|
end
|
|
|
|
|
|
edit do
|
|
|
- field :product_attr_key
|
|
|
+ field :attr_key_id
|
|
|
field :name
|
|
|
field :recommend
|
|
|
end
|