From f9be7a2cb8a8484615931a53b36ca9dc139a2a79 Mon Sep 17 00:00:00 2001 From: aignatov-bio Date: Thu, 5 Mar 2020 12:58:25 +0100 Subject: [PATCH] Add alphabetical order for tasks without due date --- app/controllers/dashboard/current_tasks_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/dashboard/current_tasks_controller.rb b/app/controllers/dashboard/current_tasks_controller.rb index 02ec41066..c7f2eeb7d 100644 --- a/app/controllers/dashboard/current_tasks_controller.rb +++ b/app/controllers/dashboard/current_tasks_controller.rb @@ -29,9 +29,9 @@ module Dashboard case task_filters[:sort] when 'date_desc' - tasks = tasks.order('my_modules.due_date': :desc) + tasks = tasks.order('my_modules.due_date': :desc).order('my_modules.name': :asc) when 'date_asc' - tasks = tasks.order('my_modules.due_date': :asc) + tasks = tasks.order('my_modules.due_date': :asc).order('my_modules.name': :asc) when 'atoz' tasks = tasks.order('my_modules.name': :asc) when 'ztoa'