Commit 94115817841afdca57d74cc0ff59a710691fc026

Authored by Rodrigo Souto
Committed by Antonio Terceiro
1 parent 721609a7

Showing pending and processed tasks ordered by creation date

(ActionItem1478)
app/controllers/my_profile/tasks_controller.rb
@@ -3,11 +3,11 @@ class TasksController < MyProfileController @@ -3,11 +3,11 @@ class TasksController < MyProfileController
3 protect 'perform_task', :profile 3 protect 'perform_task', :profile
4 4
5 def index 5 def index
6 - @tasks = profile.all_pending_tasks 6 + @tasks = profile.all_pending_tasks.sort_by(&:created_at)
7 end 7 end
8 8
9 def processed 9 def processed
10 - @tasks = profile.all_finished_tasks 10 + @tasks = profile.all_finished_tasks.sort_by(&:created_at)
11 end 11 end
12 12
13 VALID_DECISIONS = [ 'finish', 'cancel' ] 13 VALID_DECISIONS = [ 'finish', 'cancel' ]