1
0
Fork 0
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:
Drew Ulmer 2012-10-24 11:50:26 -05:00
parent 174c2903d7
commit b853871667

View file

@ -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