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


30
31
32
# File 'app/models/alchemy/site/layout.rb', line 30

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

#partial_nameObject

Returns the name for the layout partial


36
37
38
# File 'app/models/alchemy/site/layout.rb', line 36

def partial_name
  name.parameterize.underscore
end