From fba60196cea96677dc1a24e3f4499911f5bae373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Benavente?= Date: Tue, 19 Mar 2024 15:27:15 -0300 Subject: [PATCH] Only override default_url_options with locale param for guest users --- app/controllers/application_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 09089398..ea9fd5f3 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -14,7 +14,11 @@ def set_locale end def default_url_options - { :locale => I18n.locale } + unless user_signed_in? + { :locale => I18n.locale } + end + + {} end # Detect Browser's locale and use that by default