开发者

Ruby on Rails Routes Issue

I have a controller called head_buses_controller.rb and in my routes have mapped it like so map.resources :head_buses

This results in URLs being http://domain.com/head_buses

I would however would like to have the URLs with a dash - instead of an underscore _.

Is it pos开发者_如何学Csible to have the URLs with the dashes go to the head_buses controller?

Cheers

Eef


Try to use this one:

resources :head_buses, :as => 'head-buses'
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜