Sha256: 7fdbc78bd0102e9ee1fbe0962d22f42cf2cee2bd91abc50384f00afa8a4826fe

Contents?: true

Size: 653 Bytes

Versions: 2

Compression:

Stored size: 653 Bytes

Contents

module Adminpanel
  class Mug < ActiveRecord::Base
    include Adminpanel::Base
    validates_presence_of :name
    
    def self.form_attributes
      [
			{
				'name' => {
					'type' => 'text_field',
					'label' => 'name',
					'placeholder' => 'name'
				}
			},
			{
				'number' => {
					'type' => 'number_field',
					'label' => 'number',
					'placeholder' => 'number'
				}
			},
      ]
    end

    def self.display_name
      'Taza' #singular
    end

    # def self.icon
    #     "truck" # fa-{icon}
    # end

    def self.routes_options
      { except:[:new, :create, :edit, :update, :destroy, :show], path:'tazas'}
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
adminpanel-2.1.1 test/dummy/app/models/adminpanel/mug.rb
adminpanel-2.1.0 spec/dummy/app/models/adminpanel/mug.rb