title: Rails routes, what's resources equivalent using match?
body: <p>I have a question about the behaviour of my <code>routes.rb</code>. The following code works perfectly but it means that both <code>GET /noodles</code> and <code>GET /</code> will return the index of noodles. Because <code>noodles_path</code> will use <code>/noodles</code> the url becomes unnecessarily long, it keeps popping up.</p>
  
  <pre><code>root :to =&gt; 'noodles#index'
  match '/new' =&gt; 'noodles#new', :as =&gt; :new_noodle, :via =&gt; [:get]
  resources :noodles, :only =&gt; [:index, :create, :show]
  </code></pre>
  
  <p>In an attempt to remove the <code>GET /noodles</code> this I tried:</p>
  
  <pre><code>root :to =&gt; 'noodles#index'
  match '/new' =&gt; 'noodles#new', :as =&gt; :new_noodle, :via =&gt; [:get]
  resources :noodles, :only =&gt; [:create, :show]
  match '/' =&gt; 'noodles#index', :as =&gt; :noodles, :via =&gt; [:get]
  </code></pre>
  
  <p>This does seem to work, but breaks the <code>:create</code> method somehow because they both have a <code>noodles</code> path and even though I specified it to <code>:get</code> only it gets confused (<code>rake routes</code> looks different, <code>noodles</code> is mentioned twice while when using <code>resources (...)</code> it's only mentioned once). So with these new routes it's impossible to create new noodles.</p>
  
  <p>What's the correct way that removes <code>GET /noodles</code> for index and sets it to <code>GET /</code> while not breaking the <code>:create</code>?</p>