From 43825a0951550dfcbaea39b7b6c05b1d040c069e Mon Sep 17 00:00:00 2001 From: Yuki Date: Thu, 11 Jun 2015 07:36:33 +0530 Subject: [PATCH] Rename locale cookie --- app/controllers/application_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index a1faf2fe..906d992b 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -14,8 +14,8 @@ class ApplicationController < ActionController::Base if params[:hl].nil? if current_user.present? I18n.locale = current_user.locale - elsif not cookies[:hl].nil? - I18n.locale = cookies[:hl] + elsif not cookies[:lang].nil? + I18n.locale = cookies[:lang] else I18n.locale = 'en' end @@ -27,7 +27,7 @@ class ApplicationController < ActionController::Base end end - cookies[:hl] = I18n.locale #unless cookies[:allow_cookies].nil? # some EU cookie bullsh- + cookies[:lang] = I18n.locale #unless cookies[:allow_cookies].nil? # some EU cookie bullsh- end # check if user got hit by the banhammer of doom