开发者

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜