Class: Adminpanel::Role

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Base
Defined in:
app/models/adminpanel/role.rb

Class Method Summary collapse

Methods included from Base

#correlative_order_gallery, #destroy_unattached_images

Class Method Details

.display_nameObject



36
37
38
# File 'app/models/adminpanel/role.rb', line 36

def self.display_name
  I18n.t('model.Role')
end

.form_attributesObject



15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# File 'app/models/adminpanel/role.rb', line 15

def self.form_attributes
  [
    {
      'name' => {
        'type' => 'text_field',
        'label' => 'Nombre',
        'placeholder' => 'Community Manager'
      }
    },
    {
      'permission_ids' => {
        'label' => 'Permisos',
        'type' => 'checkbox',
        'options' => Proc.new { |object|
          Adminpanel::Permission.all
        },
      }
    }
  ]
end

.iconObject



40
41
42
# File 'app/models/adminpanel/role.rb', line 40

def self.icon
  'ticket'
end