test/dummy/app/models/adminpanel/product.rb in adminpanel-2.2.5 vs test/dummy/app/models/adminpanel/product.rb in adminpanel-2.3.0

- old
+ new

@@ -3,20 +3,18 @@ include Adminpanel::Base include Adminpanel::Facebook include Adminpanel::Twitter has_many :categorizations - has_many :categories, :through => :categorizations + has_many :categories, through: :categorizations mount_images :photos validates_presence_of :name validates_presence_of :price validates_presence_of :description def self.form_attributes - - [ {"category_ids" => {"type" => "has_many", "model" => "Adminpanel::Category", "name" => "category_ids"}}, { 'name' => { 'type' => 'text_field', @@ -31,11 +29,13 @@ }, { 'photos' => { 'type' => 'adminpanel_file_field', 'label' => 'photo', - 'placeholder' => 'photo'} + 'placeholder' => 'photo', + 'max-files' => 2 + } }, { 'description' => { 'type' => 'wysiwyg_field', 'label' => 'description', @@ -47,12 +47,12 @@ def self.display_name "Producto" end - def self.gallery_children - 'photos' - end + # def self.gallery_children + # 'photos' + # end def self.icon "icon-truck" end end