template/lib/generators/angular_controller/angular_controller_generator.rb
def add_menu
    tmp_file = "app/views/layouts/_menu.html.haml"
    if FileTest.exists?(tmp_file) then
      open(tmp_file, 'a') { |f|
        f.puts ERB.new("\n%li=link_to('#{class_name.tableize}', '/##{class_name.tableize}')").result(binding)
      }
    end
  end
# Add the link to the menu
Add the link to the menu
Add the link to the menu
def add_menu
    tmp_file = "app/views/layouts/_menu.html.haml"
    if FileTest.exists?(tmp_file) then
      open(tmp_file, 'a') { |f|
        f.puts ERB.new("\n%li=link_to('#{class_name.tableize}', '/##{class_name.tableize}')").result(binding)
      }
    end
  end
def add_menu tmp_file = "app/views/layouts/_menu.html.haml" if FileTest . exists? ( tmp_file ) then open ( tmp_file , 'a' ) { | f | f . puts ERB . new ( "\n%li=link_to('#{class_name.tableize}', '/##{class_name.tableize}')" ) . result ( binding ) } end end
Add the link to the menu
Add the link to the menu