activeadmin: Changing config.authentication_keys to :login breaks Active Admin login
I have setup my application with Active Admin. I have to say it’s extremely simple to get running!
I have set Devise up in my application before I installed and setup Active Admin. I wanted to allow users to login with either username or password so I changed config.authentication_keys = [ :email ]
to config.authentication_keys = [ :login ]
.
Users can login with either their username or password. Going back into active admin, I am unable to login.
It just shows
NoMethodError in Active_admin/devise/sessions#new
undefined method `login' for #<AdminUser:0x007fe5d62bc730>
Changing the config.authentication_keys = [ :login ]
back to config.authentication_keys = [ :email ]
, I am able to login to Active Admin no problems.
About this issue
- Original URL
- State: closed
- Created 13 years ago
- Comments: 23 (1 by maintainers)
Excellent! That’s worked 😃
Here is my full
admin_user.rb
if anyone is interested: https://gist.github.com/1528912