Sha256: 0f410068b2ac272bcfea23515dc42d45fcb0b66fa94f34cb730646b2c7a6c2d2
Contents?: true
Size: 1.11 KB
Versions: 6
Compression:
Stored size: 1.11 KB
Contents
module Adminpanel class TestObject < ActiveRecord::Base include Adminpanel::Base has_and_belongs_to_many :categories, join_table: "adminpanel_test_object_category" 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', '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
6 entries across 6 versions & 1 rubygems