Sha256: a5850606bc39a23f274a0f91ad873519bc997449017203b805779126edb55c0b

Contents?: true

Size: 798 Bytes

Versions: 4

Compression:

Stored size: 798 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.collection_name
      'Irregular Tazas'
    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

4 entries across 4 versions & 1 rubygems

Version Path
adminpanel-3.6.1 test/dummy/app/models/adminpanel/mug.rb
adminpanel-3.6.0 test/dummy/app/models/adminpanel/mug.rb
adminpanel-3.5.1 test/dummy/app/models/adminpanel/mug.rb
adminpanel-3.5.0 test/dummy/app/models/adminpanel/mug.rb