when you specify route inside resource, AFAIK
if you specify the route inside “collection”, rails will always append ies like priorities
if you specify the route inside “member”, rails will always use the singular word liake priority
so in that way, one solution (but i dont know if this the best way to do it). is define custom route outside the resource block. such as.
resources :priorities do
end
get ‘/priorities/add’ => ‘priorities#new’, :as => :add_priority
this will give routes
priorities GET /priorities(.:format) {:action=>“index”, :controller=>“priorities”}
POST /priorities(.:format) {:action=>“create”, :controller=>“priorities”}
new_priority GET /priorities/new(.:format) {:action=>“new”, :controller=>“priorities”}
edit_priority GET /priorities/:id/edit(.:format) {:action=>“edit”, :controller=>“priorities”}
priority GET /priorities/:id(.:format) {:action=>“show”, :controller=>“priorities”}
PUT /priorities/:id(.:format) {:action=>“update”, :controller=>“priorities”}
DELETE /priorities/:id(.:format) {:action=>“destroy”, :controller=>“priorities”}
add_priority GET /priorities/add(.:format) {:action=>“new”, :controller=>“priorities”}
btw, im using rails 3, i don’t know if there’s different with the 2.x version
Ahmy Yulrizka