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_DEFINITIONS_FILE =
Rails.root.join('config/alchemy/site_layouts.yml')

Instance Method Summary collapse

Instance Method Details

#definitionObject

Returns site’s layout definition



28
29
30
# File 'app/models/alchemy/site/layout.rb', line 28

def definition
  self.class.definitions.detect { |l| l['name'] == partial_name }
end

#partial_nameObject

Returns the name for the layout partial



34
35
36
# File 'app/models/alchemy/site/layout.rb', line 34

def partial_name
  name.parameterize.underscore
end