Class: ConstructorPages::Template
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- ConstructorPages::Template
- Includes:
- CodeNameUniq
- Defined in:
- app/models/constructor_pages/template.rb
Overview
Template model. Template allows assing different design for pages.
Templates has many fields. For example:
template "Product" should has fields like "price", "description", "size" etc.
Instance Method Summary collapse
-
#child ⇒ Object
Return child corresponding child_id or children first.
-
#to_accusative ⇒ Object
Convert name to accusative.
Methods included from CodeNameUniq
Instance Method Details
#child ⇒ Object
Return child corresponding child_id or children first
25 26 27 |
# File 'app/models/constructor_pages/template.rb', line 25 def child Template.find(child_id) if child_id end |
#to_accusative ⇒ Object
Convert name to accusative
30 31 32 |
# File 'app/models/constructor_pages/template.rb', line 30 def to_accusative self.name.mb_chars.downcase.to_s.accusative end |