Class: Mozaic::LayoutGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Mozaic::LayoutGenerator
- Includes:
- Rails::Generators::Migration
- Defined in:
- lib/generators/mozaic/layout_generator.rb
Instance Method Summary collapse
Instance Method Details
#create_files ⇒ Object
15 16 17 18 19 |
# File 'lib/generators/mozaic/layout_generator.rb', line 15 def create_files names = [:name].split('/') name = names.pop template 'layout.html.erb', "app/views/layouts/#{names.join('/')}/#{name}.html.erb" end |