title: Rails routing issue, can't figure out the link path
body: <p>Let me fair from the outset, and tell you that I've 'solved' the problem I'm describing. But a solution that you don't understand is not really a solution, now is it?</p>
  
  <p>I have a resource, Newsbites. I have an index page for Newsbites. All my CRUD actions work fine. </p>
  
  <p>I created a separate index (<code>frontindex.html.erb</code>) that acts as the front page of my website to show the newest Newsbites. The formatting is different from my normal index so readers get a larger photo, more of the text of the article(more ads too:). </p>
  
  <p>In my routing table, I have the following statements:</p>
  
  <pre><code> resources :newsbites
   get 'newsbites/frontindex'
   root 'newsbites#frontindex'
  </code></pre>
  
  <p>Rake routes show the following:</p>
  
  <pre><code>newsbites_frontindex GET    /newsbites/frontindex(.:format)   newsbites#frontindex
  </code></pre>
  
  <p>If I load my website from the root (localhost:3000), it works great. There is a separate menu page that is rendered at the top, and it loads fine. I can click on all links, except the '<code>Home</code>' link, and they work fine. </p>
  
  <p>The 'Home' link is:</p>
  
  <pre><code> &lt;%= link_to 'Home', newsbites_frontindex_path %&gt;
  </code></pre>
  
  <p>When I click on the linked, I get the following error:</p>
  
  <pre><code>Couldn't find Newsbite with 'id'=frontindex
  </code></pre>
  
  <p>The error points to the '<code>show</code>' action of my Newbites controller. Here are the <code>frontindex</code> and show def from the controller. They appear exactly as I'm posting them:</p>
  
  <pre><code>  def frontindex
    @newsbites = Newsbite.all
    end
  
  
    def show
     @newsbite = Newsbite.find(params[:id])
    end
  </code></pre>
  
  <p>I don't get it. Why is the show action being called by <code>newbites_frontindex_path</code> when there is both a def and views that match? Now, I can get around this by simply pointing home to <code>root_path</code>. But that doesn't help me understand. What if this was not the root of the site? </p>
  
  <p>Any help would be greatly appreciated. </p>