title: Rails 4: Invalid route name, already in use (ArgumentError)
body: <p>Well the error is telling the truth, I have used the route name 'contact' twice, but one match is for a <code>get</code> request and the other for a <code>post</code>. I have been following the following tutorial for setting up Contact Form in Rails: <a href="http://matharvard.ca/posts/2011/aug/22/contact-form-in-rails-3/" rel="nofollow">http://matharvard.ca/posts/2011/aug/22/contact-form-in-rails-3/</a>, and the author suggests adding the following to my routes file: </p>
  
  <pre><code>match 'contact' =&gt; 'contact#new', :as =&gt; 'contact', :via =&gt; :get
  match 'contact' =&gt; 'contact#create', :as =&gt; 'contact', :via =&gt; :post
  </code></pre>
  
  <p>However that gives me the following error: </p>
  
  <pre><code>Invalid route name, already in use: 'contact'  (ArgumentError)
  </code></pre>
  
  <p>Here is my own <code>routes.rb</code> file: </p>
  
  <pre><code>Fls::Application.routes.draw do
    root 'welcome#index'
    match 'contact' =&gt; 'contact#new', :via =&gt; :get
    match 'contact' =&gt; 'contact#create', :as =&gt; 'contact', :via =&gt; :post
  end
  </code></pre>