adding custom routes to a restful app

i've done a few project using restful routing but now i need to add an action that isn't part of one of the main crud methods.

i added this to my routes.rb file:

  map.resources :works, :collection => { :featured => :get }

and have a "featured" action in the works controller. but for some reason everytime i try to go to http://localhost:3000/works/featured, i get an unknown action error. looking at the log file, it's trying to find this page:

Parameters: {"action"=>"show", "id"=>"featured", "controller"=>"works"}

is there something i did wrong or something i missed in order to make this work?

thanks.

map.feature 'works/featured', :controller => 'works', :action => 'featured'

then user feature_url or feature_path to get at a link to it. I hope this gets you where you need to be headed.

Amos

You would have to use the URL:

http://localhost:3000/works;featured

thanks. yeah i was just trying to access the url wrong.