title: Ruby on rails routing is displaying only show view for index and edit action methods
body: <p>I have created one controller and added default 7 action methods , I have also created 4 views and those are index , new , show , edit all contains difeent data </p>
  
  <pre><code>also added resources :posts controller configuration into my routing file as well 
  '
  My problem is when i try to navigate to index or edit views using url .. it displays me only show views , however index method is working as a default 
  
  below are my urls `enter code here`
  </code></pre>
  
  <p>1 . <a href="http://localhost:3000/posts/index[" rel="nofollow">http://localhost:3000/posts/index[</a>^]</p>
  
  <p>if i try this it gives me show view data </p>
  
  <ol start="2">
  <li>localhost:3000/posts</li>
  </ol>
  
  <p>this gives me proper index data (default without mentioning index action name)</p>
  
  <ol start="3">
  <li><a href="http://localhost:3000/posts/edit[" rel="nofollow">http://localhost:3000/posts/edit[</a>^]</li>
  </ol>
  
  <p>this one but always shows me data present in show view and not in data present in edit view</p>
  
  <p>Please suggest </p>
  
  <p>Below are few lines from my route file.</p>
  
  <pre><code>Hide   Copy Code
  Rails.application.routes.draw do
    get 'home/index'
    resources :posts
  
    # The priority is based upon order of creation: first created -&gt; highest priority.
    # See how all your routes lay out with "rake routes".
  
    # You can have the root of your site routed with "root"
    root 'home#index'
  </code></pre>