We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70071a0 commit c7068e4Copy full SHA for c7068e4
1 file changed
app/controllers/public/home_controller.rb
@@ -13,8 +13,6 @@ def index
13
@participate = @activities.map(&:id)
14
end
15
16
- private
17
-
18
def redirect_to_locale
19
# Check if the URL already contains a locale
20
return if request.path.match?(/^\/\?l=(nl|en)(\/|$)/)
@@ -23,7 +21,7 @@ def redirect_to_locale
23
21
locale = request.env['HTTP_ACCEPT_LANGUAGE'].to_s.start_with?('nl') ? 'nl' : 'en'
24
22
25
# Redirect to /?l=nl/... or /?l=en/...
26
- redirect_to("/?l=#{locale}#{request.path}", allow_other_host: false)
+ redirect_to("/?l=#{ locale }#{ request.path }", allow_other_host: false)
27
28
29
def create
0 commit comments