Sha256: ea6b5e3a1f4da71863159a50d12423c86fb7142a428d1c447732471b7e11f215

Contents?: true

Size: 708 Bytes

Versions: 6

Compression:

Stored size: 708 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

6 entries across 6 versions & 1 rubygems

Version Path
adminpanel-2.2.5 test/dummy/app/models/adminpanel/mug.rb
adminpanel-2.2.4 test/dummy/app/models/adminpanel/mug.rb
adminpanel-2.2.3 test/dummy/app/models/adminpanel/mug.rb
adminpanel-2.2.2 test/dummy/app/models/adminpanel/mug.rb
adminpanel-2.2.1 test/dummy/app/models/adminpanel/mug.rb
adminpanel-2.2.0 test/dummy/app/models/adminpanel/mug.rb