设计更新用户,无需密码 [英] Devise update user without password
本文介绍了设计更新用户,无需密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在设计中更新没有密码的用户属性。情况就是这样,如果密码和密码确认字段不为空,那么我需要设计错误,如果它们为空,则需要更新其他用户属性。我如何用设计来做到这一点?
提前感谢!
解决方案
这是你要找的?来自Devise wiki
它显示如何做轨道3和轨道4
===================== p>
约翰的解决方案是一个更简单的选择
I want to update users attributes without password in devise. The case is like, if password and password confirmation fields are not blank then I need devise error and if they are blank then other user attributes need to be updated. How could I do this with devise?
Thanks in advance!
解决方案
Is this what you're look for? From the Devise wiki
Allow users to edit their account without providing a password
It shows how to do it for rails 3 and rails 4
=======================
John's solution is a simpler alternative
这篇关于设计更新用户,无需密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文