Skip to content

Commit

Permalink
Fix Rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
n-rodriguez committed Nov 7, 2024
1 parent 7a7934f commit bc40666
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/route_translator/translator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ def translate_resource(str, locale, scope)
handler = proc { |exception| exception }
opts = { locale: locale, scope: scope }

if I18n.t(str, **opts.merge(exception_handler: handler)).is_a?(I18n::MissingTranslation)
I18n.t(str, **opts.merge(fallback_options(str, locale)))
if I18n.t(str, **opts, exception_handler: handler).is_a?(I18n::MissingTranslation)
I18n.t(str, **opts, **fallback_options(str, locale))
else
I18n.t(str, **opts)
end
Expand Down

0 comments on commit bc40666

Please sign in to comment.