Class: Adminpanel::Section
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Adminpanel::Section
- Includes:
- Base
- Defined in:
- app/models/adminpanel/section.rb
Constant Summary collapse
- VALID_EMAIL_REGEX =
/\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.display_name ⇒ Object
51 52 53 |
# File 'app/models/adminpanel/section.rb', line 51 def self.display_name 'Seccion' end |
.form_attributes ⇒ Object
38 39 40 41 42 43 44 45 |
# File 'app/models/adminpanel/section.rb', line 38 def self.form_attributes [ {'description' => {'name' => 'Descripcion', 'description' => 'label', 'label' => 'Seccion'}}, {'name' => {'name' => 'name', 'label' => 'Seccion'}}, {'key' => {'name' => 'key', 'label' => 'Llave'}}, {'page' => {'name' => 'page'}}, ] end |
.icon ⇒ Object
47 48 49 |
# File 'app/models/adminpanel/section.rb', line 47 def self.icon 'tasks' end |
Instance Method Details
#description ⇒ Object
55 56 57 58 59 60 61 |
# File 'app/models/adminpanel/section.rb', line 55 def description if self.has_description && !self.attributes['description'].nil? return self.attributes['description'].html_safe else return self.attributes['description'] end end |