Skip to content

Commit

Permalink
Update i18n-filter.rb - add lost '.url'
Browse files Browse the repository at this point in the history
Add `result.url`
  • Loading branch information
anitagraham authored Feb 21, 2024
1 parent 36c90ec commit 7ae93de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/refinery/i18n-filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def around_generate(params, &block)
result = result.is_a?(Array) ? result.first : result
if ::Refinery::I18n.url_filter_enabled? and
locale != ::Refinery::I18n.default_frontend_locale and
result !~ %r{^/(#{Refinery::Core.backend_route}|wymiframe)}
result.url !~ %r{^/(#{Refinery::Core.backend_route}|wymiframe)}
result.url.sub!(%r(^(http.?://[^/]*)?(.*))) { "#{$1}/#{locale}#{$2}" }
end
end
Expand Down

0 comments on commit 7ae93de

Please sign in to comment.