spec/dummy/app/models/adminpanel/product.rb in adminpanel-2.0.1 vs spec/dummy/app/models/adminpanel/product.rb in adminpanel-2.1.0
- old
+ new
@@ -1,9 +1,9 @@
module Adminpanel
class Product < ActiveRecord::Base
include Adminpanel::Base
-
+
has_many :categorizations
has_many :categories, :through => :categorizations
mount_images :photos
validates_presence_of :name
@@ -16,11 +16,10 @@
[
{"category_ids" => {"type" => "has_many", "model" => "Adminpanel::Category", "name" => "category_ids"}},
{
'name' => {
'type' => 'text_field',
- 'name' => 'name',
'label' => 'name',
'placeholder' => 'name'}
},
{
'price' => {
@@ -29,25 +28,24 @@
}
},
{
'photos' => {
'type' => 'adminpanel_file_field',
- 'name' => 'photo',
'label' => 'photo',
'placeholder' => 'photo'}
},
{
'description' => {
'type' => 'wysiwyg_field',
- 'name' => 'description',
'label' => 'description',
- 'placeholder' => 'description'}
+ 'placeholder' => 'description'
+ }
},
]
end
def self.display_name
- "Product"
+ "Producto"
end
def self.icon
"icon-truck"
end