title: form_for method undefined
body: <p>I read a book called 'Rails 3 in Action' and made two pages: 'index' and 'new', set routes.rb:</p>
  
  <pre><code>root :to =&gt; 'projects#index'
  match '/new', to:'projects#new'
  </code></pre>
  
  <p>and projects_controller:</p>
  
  <pre><code>def new
    @project = Project.new
  end
  
  def create
    @project = Project.new(parmas[:project])
    @project.save
    flash[:notice] = "Project has been created"
    redirect_to @project
  end
  </code></pre>
  
  <p>and view files:</p>
  
  <p>index.html.erb </p>
  
  <pre><code>&lt;%= link_to "new", new_path %&gt;
  </code></pre>
  
  <p>This works correctly, because I end up at <code>localhost:3000/new</code>, but the problem is:</p>
  
  <pre><code>&lt;%= form_for(@project) do |f| %&gt;
  </code></pre>
  
  <p>This results in:</p>
  
  <blockquote>
    <p>undefined method `projects_path' for #&lt;#:0x416b830></p>
  </blockquote>
  
  <p>Where is projects_path? When I print <code>&lt;%= root_path %&gt;</code>, I get <code>/</code>, but <code>&lt;%= projects_path %&gt;</code> gives error undefined method.</p>
  
  <p>How do I define a method <code>projects_path</code>? Root is not <code>projects_path</code>?</p>