开发者

Devise, how to downcase emails on save?

开发者 https://www.devze.com 2023-03-31 03:07 出处:网络
right now users can log into devise with their email & password. Problem is that email is saved case sensitive which is confusing users.

right now users can log into devise with their email & password. Problem is that email is saved case sensitive which is confusing users.

Does Devise have a setting to downcase the email, something like downcase_keys?

I know I can manually do this with a before_save but I tho开发者_如何学Cught I had read devise had this as an option out of the box. I just can't find the doc on how to set it to downcase?

Thanks


You should be able to configure it using case_insensitive_keys in config/initializers/devise.rb (see here).

0

精彩评论

暂无评论...
验证码 换一张
取 消