what is the equivalent in rails3 routes?
I have used this route in rails 2.3.5 - basically, I wanted to be able to parametrize my controller that I se开发者_Go百科nd to the named route.
do_action "do_action/:controller" , :action => "do_action"
what is the equivalent of this in rails3 routes?
This doesn't work:
match "do_action/:controller" , :to => ":controller#do_action", :as => "do_action"
thanks
Have you tried this?
namespace :do_action do
resources :controller
end
Which will output for a controller named pages_controller
:
do_action/pages
精彩评论