class Alchemy::Generators::PageLayoutsGenerator
Public Instance Methods
create_partials()
click to toggle source
# File lib/generators/alchemy/page_layouts/page_layouts_generator.rb, line 11 def create_partials @page_layouts = load_alchemy_yaml("page_layouts.yml") return unless @page_layouts @page_layouts.each do |page_layout| @page_layout_name = page_layout["name"].underscore conditional_template "layout.html.#{template_engine}", "#{page_layouts_dir}/_#{@page_layout_name}.html.#{template_engine}" end end
Private Instance Methods
page_layouts_dir()
click to toggle source
# File lib/generators/alchemy/page_layouts/page_layouts_generator.rb, line 23 def page_layouts_dir @_page_layouts_dir ||= "app/views/alchemy/page_layouts" end