开发者

Rails 2.3.5: routes names for members action to be different from the action name

I have a rails 2.3.5 application where an action acb is changed to pqr and modified so that it works only for "get" method.

To achive this I have used resource route with options like

map.resources :controller, :member => {:pqr => :get}

The original view file has acb_controller_path link in many places. If I change the path in view file as pqr_开发者_运维技巧controller_path it works fine.

Is there a way I can refer acb_controller_path to controller/:id/pqr ?


You're better off changing the view paths to point to your new route, and I think I'm misunderstanding your question a little but depending which way you're trying to do it, you can try something like this I guess?

map.acb_controller '/controller/:id/pqr', :controller => "controller", :action => "pqr"
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜