Sha256: 6ecfec9d00694f2d4723ec6af5f5ca79393fed66b386953e8ba32b908bc8353b

Contents?: true

Size: 798 Bytes

Versions: 7

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

7 entries across 7 versions & 1 rubygems

Version Path
adminpanel-2.5.3 test/dummy/app/models/adminpanel/mug.rb
adminpanel-2.5.2 test/dummy/app/models/adminpanel/mug.rb
adminpanel-2.5.1 test/dummy/app/models/adminpanel/mug.rb
adminpanel-2.5.0 test/dummy/app/models/adminpanel/mug.rb
adminpanel-2.4.3 test/dummy/app/models/adminpanel/mug.rb
adminpanel-2.4.2 test/dummy/app/models/adminpanel/mug.rb
adminpanel-2.4.1 test/dummy/app/models/adminpanel/mug.rb