Module: Alchemy::Site::Layout
- Extended by:
- ActiveSupport::Concern
- Included in:
- Alchemy::Site
- Defined in:
- app/models/alchemy/site/layout.rb
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- SITE_LAYOUTS_FILE =
Rails.root.join('config/alchemy/site_layouts.yml')
Instance Method Summary collapse
-
#layout_definition ⇒ Object
Returns site’s layout definition.
-
#layout_partial_name ⇒ Object
Returns the name for the layout partial.
Instance Method Details
#layout_definition ⇒ Object
Returns site’s layout definition
28 29 30 |
# File 'app/models/alchemy/site/layout.rb', line 28 def layout_definition self.class.layout_definitions.detect { |l| l['name'] == layout_partial_name } end |
#layout_partial_name ⇒ Object
Returns the name for the layout partial
34 35 36 |
# File 'app/models/alchemy/site/layout.rb', line 34 def layout_partial_name name.parameterize.underscore end |