1

我的 routes.rb 中有这个:

resources :profiles, :only => :show  

我正在建立一个这样的链接:<%= link_to( "profile", profile_path(13)) %>它给了我一个 url /profile?id=13- 我希望它给我/profiles/13(因为那个有效)。

我究竟做错了什么?

此资源的 Rake 路由结果:

GET      /profiles/:id(.:format)                                     profiles#show
4

0 回答 0