Class: Mozaic::LayoutGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Includes:
Rails::Generators::Migration
Defined in:
lib/generators/mozaic/layout_generator.rb

Instance Method Summary collapse

Instance Method Details

#create_filesObject



15
16
17
18
19
# File 'lib/generators/mozaic/layout_generator.rb', line 15

def create_files
    names = options[:name].split('/')
    name = names.pop
    template 'layout.html.erb', "app/views/layouts/#{names.join('/')}/#{name}.html.erb"
end