1
0
Fork 0
mirror of https://github.com/heartcombo/devise.git synced 2022-11-09 12:18:31 -05:00

Add a descriptive text for those upgrading.

This commit is contained in:
José Valim 2011-03-30 14:40:03 +02:00
parent e4902143f8
commit 8a3deb98cd

View file

@ -17,6 +17,17 @@ module Devise
Devise.include_helpers(Devise::Controllers)
end
initializer "devise.auth_keys" do
if Devise.authentication_keys.size > 1
puts "[DEVISE] You are configuring Devise to use more than one authentication key. " \
"In previous versions, we automatically added #{Devise.authentication_keys[1..-1].inspect} " \
"as scope to your e-mail validation, but this was changed now. If you were relying in such " \
"behavior, you should remove :validatable from your models and add the validations manually. " \
"To get rid of this warning, you can comment config.authentication_keys in your initializer " \
"and pass the current values as key to the devise call in your model."
end
end
initializer "devise.omniauth" do |app|
Devise.omniauth_configs.each do |provider, config|
app.middleware.use config.strategy_class, *config.args do |strategy|