From ad961593366456a488e51b489e62e0efcf70de06 Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Fri, 20 Oct 2017 00:59:56 +0200 Subject: [PATCH] Sort the task at dashboard by due_date --- app/controllers/home_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index ba6d7247..97525f5c 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -3,12 +3,12 @@ class HomeController < ApplicationController def index # unaccepted tasks - @unaccepted_tasks = Task.unaccepted_tasks_for(current_user) + @unaccepted_tasks = Task.order(:due_date).unaccepted_tasks_for(current_user) # task in next week - @next_tasks = Task.next_assigned_tasks_for(current_user) + @next_tasks = Task.order(:due_date).next_assigned_tasks_for(current_user) # count tasks with no responsible person # tasks for groups the current user is not a member are ignored - @unassigned_tasks = Task.unassigned_tasks_for(current_user) + @unassigned_tasks = Task.order(:due_date).unassigned_tasks_for(current_user) end def profile