Rails/Devise: valid_password? method returns nil

2019-08-08 13:18发布

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条回答
Animai°情兽
2楼-- · 2019-08-08 13:42

This can be fixed by setting the invitation_token to nil.

查看更多
登录 后发表回答