Rails/Devise: valid_password? method returns nil

百般思念 提交于 2019-12-13 02:37:53

问题


In my app there are two kinds of users (Athletes & Users). The Athlete model extends the User model and the regular user model assigns different roles to other kinds of users.

For some reason one some of my users with a certain kind of role, the valid_password? method is not working. This is for users who have been invited via the invitable devise module. Any one else run into this? This is causing my app to not work properly where invited users cannot log in


回答1:


This can be fixed by setting the invitation_token to nil.



来源:https://stackoverflow.com/questions/19599201/rails-devise-valid-password-method-returns-nil

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!