mirror of
https://github.com/heartcombo/devise.git
synced 2022-11-09 12:18:31 -05:00
Make #set_flash_message respect i18n-set resource_name
Using #devise_i18n_options allows overriding any i18n keys but the resulting call to I18n.t does not respect an override of resource_name.
This commit is contained in:
parent
174c2903d7
commit
b853871667
1 changed files with 1 additions and 1 deletions
|
@ -168,7 +168,7 @@ MESSAGE
|
|||
options[:default] = Array(options[:default]).unshift(kind.to_sym)
|
||||
options[:resource_name] = resource_name
|
||||
options = devise_i18n_options(options) if respond_to?(:devise_i18n_options, true)
|
||||
message = I18n.t("#{resource_name}.#{kind}", options)
|
||||
message = I18n.t("#{options[:resource_name]}.#{kind}", options)
|
||||
flash[key] = message if message.present?
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue