Class: Seivan::Generators::Html5Generator

Inherits:
Base
  • Object
show all
Defined in:
lib/generators/seivan/html5/html5_generator.rb

Instance Method Summary collapse

Methods inherited from Base

banner, source_root

Instance Method Details

#create_layoutObject



10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/generators/seivan/html5/html5_generator.rb', line 10

def create_layout
  if options.haml?
    template "application.html.haml", "app/views/layouts/#{file_name}.html.haml"
    template "_head.html.haml", "app/views/layouts/_head.html.haml"
    template "_header.html.haml", "app/views/layouts/_header.html.haml"
    template "_flashes.html.haml", "app/views/layouts/_flashes.html.haml"
    template "_footer.html.haml", "app/views/layouts/_footer.html.haml"
    template "_javascripts.html.haml", "app/views/layouts/_javascripts.html.haml"
    template "_stylesheets.html.haml", "app/views/layouts/_stylesheets.html.haml"
    template "_errors.html.haml", "app/views/shared/_errors.html.haml"
    template "jquery.js", "public/javascripts/jquery.js"
    template "jquery_ujs.js", "public/javascripts/jquery_ujs.js"
    template "layout_helper.rb", "app/helpers/layout_helper.rb"
    inject_into_class "app/controllers/application_controller.rb", "ApplicationController", "  helper :layout\n"
  end
end