Sha256: ab7227a13c24ff08bfd9683baaa7976f23f38d14f4ae937f0ca7293853cdb512

Contents?: true

Size: 728 Bytes

Versions: 14

Compression:

Stored size: 728 Bytes

Contents

module Adminpanel
  class Salesman < ActiveRecord::Base
    include Adminpanel::Base
    include Adminpanel::Facebook

    belongs_to :product

    def self.form_attributes
      [
        {
          'name' => {
            'type' => 'text_field',
            'label' => 'name',
            'placeholder' => 'name'
          }
        },
        {
          'product_id' => {
            'type' => 'select',
            'label' => 'product_id',
            'options' => Proc.new { |object| Adminpanel::Product.all },
            'name_method' => :supername
          }
        },
      ]
    end

    def self.display_name
      'Agente' #singular
    end

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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
adminpanel-3.6.1 test/dummy/app/models/adminpanel/salesman.rb
adminpanel-3.6.0 test/dummy/app/models/adminpanel/salesman.rb
adminpanel-3.5.1 test/dummy/app/models/adminpanel/salesman.rb
adminpanel-3.5.0 test/dummy/app/models/adminpanel/salesman.rb
adminpanel-3.4.7 test/dummy/app/models/adminpanel/salesman.rb
adminpanel-3.4.6 test/dummy/app/models/adminpanel/salesman.rb
adminpanel-3.4.5 test/dummy/app/models/adminpanel/salesman.rb
adminpanel-3.4.4 test/dummy/app/models/adminpanel/salesman.rb
adminpanel-3.4.3 test/dummy/app/models/adminpanel/salesman.rb
adminpanel-3.4.2 test/dummy/app/models/adminpanel/salesman.rb
adminpanel-3.4.1 test/dummy/app/models/adminpanel/salesman.rb
adminpanel-3.4.0 test/dummy/app/models/adminpanel/salesman.rb
adminpanel-3.3.4 test/dummy/app/models/adminpanel/salesman.rb
adminpanel-3.3.3 test/dummy/app/models/adminpanel/salesman.rb