Class: NgOnRails::LayoutGenerator

Inherits:
NgOnRailsGenerator show all
Defined in:
lib/generators/ng_on_rails/layout_generator.rb

Instance Method Summary collapse

Methods inherited from NgOnRailsGenerator

#set_attributes, source_root

Instance Method Details

#copy_app_controllerObject



18
19
20
21
22
23
24
# File 'lib/generators/ng_on_rails/layout_generator.rb', line 18

def copy_app_controller
  if options[:app_controller]
    option_copy_file "#{LayoutGenerator.source_root}/app_controller_template.js.coffee", 
      "app/assets/javascripts/#{module_path}angular_app/controllers/app_controller.js.coffee",
      "app controller"
  end
end

#copy_layoutObject



12
13
14
15
16
# File 'lib/generators/ng_on_rails/layout_generator.rb', line 12

def copy_layout
  option_template "#{LayoutGenerator.source_root}/#{options[:format]}/layout_template.html.#{options[:format]}.erb", 
    "app/views/layouts/#{module_path}#{options[:layout_name]}.html.#{options[:format]}",
    "layout file"  
end