i have two identically controllers routed in the same way :
resources :profile resources :friends
here are the controllers
class ProfileController < ApplicationController def index @text = "profile" end def show end def new end def create end def edit end def update end def destroy end end class FriendsController < ApplicationController def index @text = "friends" end def show end def new end def create end def edit end def update end def destroy end end but when i want to define a menu in the view layout , a problem occurs for the profile controller but not also for the friends controller . Here is the code that generates the error :
<ul id="menu"> <li> <%= link_to "Friends",friends_path %> </li> <li> <%= link_to "Profile", profile_path %> </li> </ul> and the error is :
No route matches {:action=>"show", :controller=>"profile"} Why is this happening if the controllers and views are identical ?