0
我想创建一个链接到批准的用户注册,管理员无需密码即可更新用户的详细信息。 Rails的3.X设计
1)首先解决
<%= link_to "Approve", edit_user_registration_path(:id => user.id, :approved => true), :method => :put %>
但是它回落No route matches [PUT] "https://stackoverflow.com/users/edit"
2)我也想约一多余动作,将一个特定的路线响应,并更新用户注册,说
match '/users/approve_user', :controller => 'users', :action => 'approve_user', :collection => { :my_action => :put}并在视图:
%- link_to "Approve", users_approve_user_path(:id => user.id), :method => :put
如何曾经,它给回该Couldn't find User with ID=approve_user
任何帮助将不胜感激
总是尝试检查每个gem的github wiki页面。所以这里是devise的wiki:https://github.com/plataformatec/devise/wiki/_pages。这里是你在找什么:https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-edit-their-account-without-providing-a-password – Ashitaka