Class: Bootswatch::Generators::LayoutGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/bootswatch/layout/layout_generator.rb

Instance Method Summary collapse

Instance Method Details

#generate_layoutObject


16
17
18
19
20
# File 'lib/generators/bootswatch/layout/layout_generator.rb', line 16

def generate_layout
  app = ::Rails.application
  ext = app.config.generators.options[:rails][:template_engine] || :erb
  template "layout.html.#{ext}", "app/views/layouts/#{theme_name}.html.#{ext}", {theme_name: theme_name, app_name: application_name}
end

#theme_nameObject


12
13
14
# File 'lib/generators/bootswatch/layout/layout_generator.rb', line 12

def theme_name
  file_name
end