devise的邮箱/密码登录能不能换成ID/密码登录?
ruby吧
全部回复
仅看楼主
level 1
风雪江花 楼主
如果可以的话求个思路
2015年11月23日 14点11分 1
level 12
這一篇文,應回答了你想要的:
https://github.com/plataformatec/devise/wiki/How-To:-Allow-users-to-sign-in-using-their-username-or-email-address
或者:
config/initializers/devise.rb
拿掉這行註解
config.authentication_keys = [ :email]
改成:
config.authentication_keys = [ :username ]
2015年12月01日 00点12分 2
已经弄好了,谢谢小吧[哈哈]
2015年12月01日 04点12分
1