Update TranslationHelper monkey-patch
The `translate` method now receives keyword arguments instead of a hash of options.
This commit is contained in:
@@ -6,7 +6,7 @@ module ActionView
|
|||||||
module TranslationHelper
|
module TranslationHelper
|
||||||
include TagHelper
|
include TagHelper
|
||||||
|
|
||||||
def t(key, options = {})
|
def t(key, **options)
|
||||||
current_locale = options[:locale].presence || I18n.locale
|
current_locale = options[:locale].presence || I18n.locale
|
||||||
|
|
||||||
@i18n_content_translations ||= {}
|
@i18n_content_translations ||= {}
|
||||||
@@ -17,7 +17,7 @@ module ActionView
|
|||||||
if translation.present?
|
if translation.present?
|
||||||
translation % options
|
translation % options
|
||||||
else
|
else
|
||||||
translate(key, options)
|
translate(key, **options)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user