Sha256: 407a0e3fd285059b267a3c1ff3e36f5b0ad750e0f32e0885e2dcce22b539458c
Contents?: true
Size: 1.17 KB
Versions: 17
Compression:
Stored size: 1.17 KB
Contents
module Adminpanel class TestObject < ActiveRecord::Base include Adminpanel::Base has_and_belongs_to_many :categories, join_table: "adminpanel_test_object_category" mount_images :textfiles def self.form_attributes [ { 'name' => { 'type' => 'text_field', 'label' => 'name' } }, { 'category_ids' => { 'type' => 'checkbox', 'options' => Proc.new { |object| Adminpanel::Category.all.map { |o| [o.id, o.name] } } } }, { 'boolean' => { 'type' => 'boolean', 'label' => 'boolean' } }, { 'text' => { 'type' => 'wysiwyg_field', 'uploader' => 'textfiles', 'label' => 'wysi' } }, { 'price' => { 'type' => 'wysiwyg_field', 'label' => 'wysi' } }, { 'quantity' => { 'type' => 'number_field', 'label' => 'wysi' } }, ] end end def self.display_name 'objeto' end end
Version data entries
17 entries across 17 versions & 1 rubygems