Class: Optimacms::TemplateType
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Optimacms::TemplateType
- Defined in:
- app/models/optimacms/template_type.rb
Constant Summary collapse
- TYPE_LAYOUT =
1
- TYPE_PAGE =
2
- TYPE_PARTIAL =
3
- TYPE_BLOCKVIEW =
4
Class Method Summary collapse
Instance Method Summary collapse
-
#to_s ⇒ Object
properties.
Class Method Details
.get_id_by_name(name) ⇒ Object
find
21 22 23 24 25 26 27 |
# File 'app/models/optimacms/template_type.rb', line 21 def self.get_id_by_name(name) row = TemplateType.where(name: name).first return nil if row.nil? row.id end |
Instance Method Details
#to_s ⇒ Object
properties
16 17 18 |
# File 'app/models/optimacms/template_type.rb', line 16 def to_s title end |