Fixed accidently switching to english locale in production.

This commit is contained in:
benni 2012-12-29 17:47:35 +01:00
parent cd583cc9b2
commit ba75a6e328
1 changed files with 6 additions and 1 deletions

View File

@ -2,7 +2,7 @@
class ApplicationController < ActionController::Base
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
# Returns the controller handling the current request.
@ -141,4 +141,9 @@ class ApplicationController < ActionController::Base
def default_url_options(options = {})
{foodcoop: FoodsoftConfig.scope}
end
# Used to prevent accidently switching to :en in production mode.
def select_language
I18n.locale = :de
end
end