to add the delete_all route
resources :friends do
This will give you delete_all_friends_path which you can use in your link_to helper (Run rake routes in the console and you will see the paths available to you)
Then you nee to create the def delete_all method in the friends controller and do whatever you wish with it
As stated in my opening sentence links for delete methods are kinda faked so the solution I have given you is the answer to your question rather than the most appropriate solution as you really really should be using a PUT request instead of a get request as deleting existing records is a dangerous action and therefore you should be using a button not a link so be careful what you wish for coz you may just get it
To do it properly add a button_to instead of a link and change the get to a put in the routes.
What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)