Update TranslationHelper monkey-patch

The `translate` method now receives keyword arguments instead of a hash
of options.
This commit is contained in:
Javi Martín
2021-09-19 14:00:37 +02:00
parent 4732a6b22d
commit 0b613158da

View File

@@ -6,7 +6,7 @@ module ActionView
module TranslationHelper
include TagHelper
def t(key, options = {})
def t(key, **options)
current_locale = options[:locale].presence || I18n.locale
@i18n_content_translations ||= {}
@@ -17,7 +17,7 @@ module ActionView
if translation.present?
translation % options
else
translate(key, options)
translate(key, **options)
end
end
end