Class: Activoate::InstallGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/activoate/install/install_generator.rb

Instance Method Summary collapse

Instance Method Details

#copy_layoutObject



13
14
15
16
17
18
19
20
21
22
# File 'lib/generators/activoate/install/install_generator.rb', line 13

def copy_layout
  return if options.no_layout      
  admin_layout_name = options.layout_type == 'sign' ? "layout_sign.html.erb" : "layout_admin.html.erb"
  case options.engine
  when 'erb'
    template  admin_layout_name, "app/views/layouts/#{layout_name.underscore}.html.erb"
  when 'haml'
    generate_haml_layout(admin_layout_name)        
  end                  
end