From 7ae93decec2abc1b462839eb63dad502a1fc43ee Mon Sep 17 00:00:00 2001 From: Anita Graham Date: Wed, 21 Feb 2024 10:59:29 +0800 Subject: [PATCH] Update i18n-filter.rb - add lost '.url' Add `result.url` --- lib/refinery/i18n-filter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/refinery/i18n-filter.rb b/lib/refinery/i18n-filter.rb index 6b0253c..452d79b 100644 --- a/lib/refinery/i18n-filter.rb +++ b/lib/refinery/i18n-filter.rb @@ -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