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

Let's show the default values for convenience.

This commit is contained in:
José Valim 2012-01-24 17:34:18 +01:00
parent 85e9dab370
commit b5fd15c2e1
2 changed files with 13 additions and 4 deletions

View file

@ -1,7 +1,7 @@
PATH
remote: .
specs:
devise (2.0.0.rc)
devise (2.0.0.rc2)
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
railties (~> 3.1)
@ -87,7 +87,7 @@ GEM
omniauth-openid (1.0.1)
omniauth (~> 1.0)
rack-openid (~> 1.3.1)
orm_adapter (0.0.5)
orm_adapter (0.0.6)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.1)

View file

@ -82,14 +82,23 @@ module Devise
end
config.after_initialize do
example = <<-YAML
en:
devise:
registrations:
signed_up_but_unconfirmed: 'A message with a confirmation link has been sent to your email address. Please open the link to activate your account.'
signed_up_but_inactive: 'You have signed up successfully. However, we could not sign you in because your account is not yet activated.'
signed_up_but_locked: 'You have signed up successfully. However, we could not sign you in because your account is locked.'
YAML
if I18n.t(:"devise.registrations.reasons", :default => {}).present?
warn "\n[DEVISE] devise.registrations.reasons in yml files is deprecated, " \
"please use devise.registrations.signed_up_but_REASON instead.\n"
"please use devise.registrations.signed_up_but_REASON instead. The default values are:\n\n#{example}\n"
end
if I18n.t(:"devise.registrations.inactive_signed_up", :default => "").present?
warn "\n[DEVISE] devise.registrations.inactive_signed_up in yml files is deprecated, " \
"please use devise.registrations.signed_up_but_inactive instead.\n"
"please use devise.registrations.signed_up_but_REASON instead. The default values are:\n\n#{example}\n"
end
end
end