Class: Bootswatch::Generators::LayoutGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Bootswatch::Generators::LayoutGenerator
- Defined in:
- lib/generators/bootswatch/layout/layout_generator.rb
Instance Method Summary collapse
Instance Method Details
#generate_layout ⇒ Object
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.[: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_name ⇒ Object
12 13 14 |
# File 'lib/generators/bootswatch/layout/layout_generator.rb', line 12 def theme_name file_name end |