Reputation: 17082
In ActiveAdmin, when I create a new user (not an admin user) and then check in the console, the authentication_token is nil. I need to manually issue reset_authencation_token! on the user so he can connect.
How can I populate this token right after the user is created ?
Upvotes: 0
Views: 367
Reputation: 7167
before_save :ensure_authentication_token
Add this to your User model. You don't have to use before_save
any similar hook will do.
Upvotes: 2