I have a User class and map.resources :users in my routes.
If I create a link
link_to @user.name, @user
It will somehow automatically create a link to /users/3 where 3 is an ID of the user. What if I want to create more userfriendly links and identify users not by IDs but by their usernames. So path would look like /users/some_user_name. How do I reassign the default link for @user so I wouldn't need to change all templates?