Module: PagesCore::PageModel::Templateable
- Extended by:
- ActiveSupport::Concern
- Included in:
- Page
- Defined in:
- app/models/concerns/pages_core/page_model/templateable.rb
Instance Method Summary collapse
Instance Method Details
#default_subtemplate ⇒ Object
24 25 26 27 28 29 30 |
# File 'app/models/concerns/pages_core/page_model/templateable.rb', line 24 def default_subtemplate template_config.value(:sub_template) || default_template || subtemplate_with_postfix || singularized_subtemplate || template end |
#template ⇒ Object
18 19 20 21 22 |
# File 'app/models/concerns/pages_core/page_model/templateable.rb', line 18 def template return self[:template] if self[:template].present? inherited_or_default_template end |
#template_config ⇒ Object
14 15 16 |
# File 'app/models/concerns/pages_core/page_model/templateable.rb', line 14 def template_config PagesCore::Templates::TemplateConfiguration.new(template) end |