我的 Rails 应用程序中有以下路线:
resources :settings, :path => :account, :only => [:edit, :update]
这将创建以下内容:
edit_setting GET /account/:id/edit(.:format) settings#edit
setting PUT /account/:id(.:format) settings#update
我如何写它所以:id
省略?
所以用户可以访问/account/edit