From eccaa099d185c351f9e8762661f0dc004f11f256 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20D=C3=A1vila?= Date: Thu, 21 Jan 2016 15:06:07 -0500 Subject: Make cookie suffix more simpler. --- app/controllers/application_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 9df37a677c0..fb5900054ce 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -409,8 +409,8 @@ class ApplicationController < ActionController::Base private def set_default_sort - controller_name = params[:controller].sub(/Controller\Z/, '').underscore - cookie_suffix = "_sort_#{controller_name}" + # Use the controller name so we have a distinct cookie for Issues, MRs and Dashboard + cookie_suffix = "_sort_#{params[:controller].underscore}" key = "#{(@project || @group || current_user).cookie_key}#{cookie_suffix}" -- cgit v1.2.1