我正在尝试更新我的 current_user (设计)的单个数据库字段。
我只想使用 link_to 助手来做到这一点:
<%= link_to "Grid", edit_user_registration_path(current_user, :project_view => "grid"), :method => :put %>
但我无法让它工作,因为结果总是一个错误:
Routing Error
No route matches [PUT] "/users/edit.1"
我的设计路线:
new_user_session GET /users/sign_in(.:format) devise/sessions#new
user_session POST /users/sign_in(.:format) devise/sessions#create
destroy_user_session DELETE /users/sign_out(.:format) devise/sessions#destroy
user_password POST /users/password(.:format) devise/passwords#create
new_user_password GET /users/password/new(.:format) devise/passwords#new
edit_user_password GET /users/password/edit(.:format) devise/passwords#edit
PUT /users/password(.:format) devise/passwords#update
cancel_user_registration GET /users/cancel(.:format) devise/registrations#cancel
user_registration POST /users(.:format) devise/registrations#create
new_user_registration GET /users/sign_up(.:format) devise/registrations#new
edit_user_registration GET /users/edit(.:format) devise/registrations#edit
PUT /users(.:format) devise/registrations#update
DELETE /users(.:format) devise/registrations#destroy
路由有什么问题?我正在使用没有任何自定义修改的设计。
谢谢!