From 0978b84f4de6620a6e0eb7f73b74d4f19a7e2ab0 Mon Sep 17 00:00:00 2001 From: wvengen Date: Fri, 28 Jun 2013 13:30:26 +0200 Subject: [PATCH] set user language on login to override session --- app/controllers/sessions_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index c89b818d..403c3616 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -11,6 +11,7 @@ class SessionsController < ApplicationController if user session[:user_id] = user.id session[:scope] = FoodsoftConfig.scope # Save scope in session to not allow switching between foodcoops with one account + session[:locale] = user_settings_language if session[:return_to].present? redirect_to_url = session[:return_to] session[:return_to] = nil