Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
birger
users
Commits
7b00579f
Commit
7b00579f
authored
Aug 30, 2018
by
o@immerda.ch
Browse files
estract lang prefix
parent
34e900f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/controllers/application_controller.rb
View file @
7b00579f
...
...
@@ -8,6 +8,7 @@ class ApplicationController < ActionController::Base
before_action
:set_locale
def
valid_l
(
l
)
l
=
l
.
to_s
[
0
..
1
]
return
l
if
l
&&
I18n
.
available_locales
.
include?
(
l
.
to_sym
)
nil
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment