We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2537a30 commit e1786cfCopy full SHA for e1786cf
1 file changed
lib/devise/failure_app.rb
@@ -112,7 +112,9 @@ def i18n_message(default = nil)
112
options[:default] = [message]
113
auth_keys = scope_class.authentication_keys
114
human_keys = (auth_keys.respond_to?(:keys) ? auth_keys.keys : auth_keys).map { |key|
115
- scope_class.human_attribute_name(key).downcase_first
+ # TODO: Remove the fallback and just use `downcase_first` once we drop support for Rails 7.0.
116
+ human_key = scope_class.human_attribute_name(key)
117
+ human_key.respond_to?(:downcase_first) ? human_key.downcase_first : human_key[0].downcase + human_key[1..]
118
}
119
options[:authentication_keys] = human_keys.join(I18n.t(:"support.array.words_connector"))
120
options = i18n_options(options)
0 commit comments