Sha256: b8c285b72cafc90f89abc29d00490bb2d57c403f6d427ecefa452189df8a03cb

Contents?: true

Size: 788 Bytes

Versions: 16

Compression:

Stored size: 788 Bytes

Contents

module Adminpanel
  class Item < ActiveRecord::Base
    include Adminpanel::Base

    belongs_to :product
    belongs_to :category

    def self.form_attributes
      [
        {
          'product_id' => {
            'type' => 'belongs_to',
            'label' => 'product',
            'placeholder' => 'product',
            'model' => 'Adminpanel::Product',
          }
        },
        {
          'category_id' => {
            'type' => 'belongs_to',
            'label' => 'category',
            'placeholder' => 'category',
            'model' => 'Adminpanel::Category',
          }
        },

      ]
    end

    def self.display_name
      'Artículo espacios Mayusculas Y ácento' #singular
    end

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

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
adminpanel-2.5.3 test/dummy/app/models/adminpanel/item.rb
adminpanel-2.5.2 test/dummy/app/models/adminpanel/item.rb
adminpanel-2.5.1 test/dummy/app/models/adminpanel/item.rb
adminpanel-2.5.0 test/dummy/app/models/adminpanel/item.rb
adminpanel-2.4.3 test/dummy/app/models/adminpanel/item.rb
adminpanel-2.4.2 test/dummy/app/models/adminpanel/item.rb
adminpanel-2.4.1 test/dummy/app/models/adminpanel/item.rb
adminpanel-2.4.0 test/dummy/app/models/adminpanel/item.rb
adminpanel-2.3.1 test/dummy/app/models/adminpanel/item.rb
adminpanel-2.3.0 test/dummy/app/models/adminpanel/item.rb
adminpanel-2.2.5 test/dummy/app/models/adminpanel/item.rb
adminpanel-2.2.4 test/dummy/app/models/adminpanel/item.rb
adminpanel-2.2.3 test/dummy/app/models/adminpanel/item.rb
adminpanel-2.2.2 test/dummy/app/models/adminpanel/item.rb
adminpanel-2.2.1 test/dummy/app/models/adminpanel/item.rb
adminpanel-2.2.0 test/dummy/app/models/adminpanel/item.rb