Skip to content

Commit

Permalink
Only override default_url_options with locale param for guest users
Browse files Browse the repository at this point in the history
  • Loading branch information
BGMP committed Mar 19, 2024
1 parent 5f9ce0d commit fba6019
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/controllers/application_controller.rb
Expand Up @@ -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
Expand Down

0 comments on commit fba6019

Please sign in to comment.