title: Undefined method or local variable in rails
body: <pre><code>undefined local variable or method `requestuser_path' for #&lt;#&lt;Class:0x007f92de073e10&gt;:0x007f92e191a020&gt;
  </code></pre>
  
  <p>I don't know why this error occurs even though I route to the required controller and the view is also no problem here.</p>
  
  <pre><code># routes.rb
  
  resources :users do 
    member do
      get :following, :followers
    end
  end
  
  resources :sessions, only: [:new, :create, :destroy]
  resources :microposts, only: [:create, :destroy]
  resources :relationships, only: [:create, :destroy]
  #resources :requests, only: [:create]
  
  root to: 'static_pages#home'
  
  match '/signup',  to: 'users#new'
  match '/signin',  to: 'sessions#new'    
  match '/signout', to: 'sessions#destroy', via: :delete
  match '/help',    to: 'static_pages#help'
  match '/about',   to: 'static_pages#about'
  match '/request', to: 'users#requestuser'
  </code></pre>
  
  <p>The named route:</p>
  
  <pre><code>&lt;% if signed_in? %&gt;
    &lt;li&gt;&lt;%= link_to "Requests", requestuser_path %&gt;&lt;/li&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>UsersController:</p>
  
  <pre><code>def requestuser
    @title = "Requests"
    @user = User.find(params[:id])
    @users = @user.followed_users.paginate(page: params[:page])
  end
  </code></pre>
  
  <p>I think there is an error in the named route as I am new to Rails. I don't know what is the cause of error. The named route is predefined or how does it work.</p>
  
  <p>I need to learn more topics on Rails can someone tell which is the best site to learn after beginner stage.</p>