mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Improve the message for case_insensitive_keys.
This commit is contained in:
parent
a71a352822
commit
ecd7c17ffd
2 changed files with 9 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
|||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
devise (2.0.0.rc2)
|
||||
devise (2.0.0)
|
||||
bcrypt-ruby (~> 3.0)
|
||||
orm_adapter (~> 0.0.3)
|
||||
railties (~> 3.1)
|
||||
|
|
|
@ -55,9 +55,14 @@ module Devise
|
|||
unless defined?(Rails::Generators)
|
||||
if Devise.case_insensitive_keys == false
|
||||
warn "\n[DEVISE] Devise.case_insensitive_keys is false which is no longer " \
|
||||
"supported. If you want to continue running on this mode, please ensure " \
|
||||
"you are not using validatable (you can copy the validations directly to your model) " \
|
||||
"and set case_insensitive_keys to an empty array.\n"
|
||||
"supported. Recent Devise versions automatically downcase the e-mail before " \
|
||||
"saving it to the database but your app isn't using this feature. You can solve " \
|
||||
"this issue by either:\n\n" \
|
||||
"1) Setting config.case_insensitive_keys = [:email] in your Devise initializer and " \
|
||||
"running a migration that will downcase all emails already in the database;\n\n" \
|
||||
"2) Setting config.case_insensitive_keys = [] (so nothing will be downcased) and " \
|
||||
"making sure you are not using Devise :validatable (since validatable assumes case" \
|
||||
"insensitivity)\n"
|
||||
end
|
||||
|
||||
if Devise.apply_schema && defined?(Mongoid)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue