Class: Alchemy::Generators::SiteLayoutsGenerator

Inherits:
Base
  • Object
show all
Defined in:
lib/generators/alchemy/site_layouts/site_layouts_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_partialsObject



11
12
13
14
15
16
17
18
19
# File 'lib/generators/alchemy/site_layouts/site_layouts_generator.rb', line 11

def create_partials
  @sites = Alchemy::Site.all
  return unless @sites

  @sites.each do |site|
    @site_name = site.name.parameterize.underscore
    conditional_template "layout.html.#{template_engine}", "#{site_layouts_dir}/_#{@site_name}.html.#{template_engine}"
  end
end