Fixed accidently switching to english locale in production.
This commit is contained in:
parent
cd583cc9b2
commit
ba75a6e328
1 changed files with 6 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
||||||
class ApplicationController < ActionController::Base
|
class ApplicationController < ActionController::Base
|
||||||
|
|
||||||
protect_from_forgery
|
protect_from_forgery
|
||||||
before_filter :select_foodcoop, :authenticate, :store_controller, :items_per_page, :set_redirect_to
|
before_filter :select_language, :select_foodcoop, :authenticate, :store_controller, :items_per_page, :set_redirect_to
|
||||||
after_filter :remove_controller
|
after_filter :remove_controller
|
||||||
|
|
||||||
# Returns the controller handling the current request.
|
# Returns the controller handling the current request.
|
||||||
|
@ -141,4 +141,9 @@ class ApplicationController < ActionController::Base
|
||||||
def default_url_options(options = {})
|
def default_url_options(options = {})
|
||||||
{foodcoop: FoodsoftConfig.scope}
|
{foodcoop: FoodsoftConfig.scope}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# Used to prevent accidently switching to :en in production mode.
|
||||||
|
def select_language
|
||||||
|
I18n.locale = :de
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue