新手问题 Device 更新用户报错: Current password can't be blank

newnewnew · February 22, 2013 · Last by newnewnew replied at February 22, 2013 · 3477 hits

app/views/device/registrations/edit.html.erb:

然后表单提交报错: Current password can't be blank

请教各位怎么解决啊???

另外还要请教下各位 Current password 是啥呢?有啥作用?

自己写个 controller 或 action 把。

Devise 的 Wiki 里面有介绍

devise 正常情况更新资料需要验证当前密码,你的表单里没有密码字段 提交的话需要参考 devise 的 controller 代码自己添一个 controller,并且用 update_without_password 来更新记录

@huacnlee 看 ruby-china 的源码搞明白了😄

You need to Sign in before reply, if you don't have an account, please Sign up first.