aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/request_controller.rb
diff options
context:
space:
mode:
authorfrancis <francis>2007-10-30 14:13:46 +0000
committerfrancis <francis>2007-10-30 14:13:46 +0000
commit9dc27a447a1c801d429c488182a88870b6b29530 (patch)
treeee7600395e8b5d233ea4d8d7f40f0de2bcfcc689 /app/controllers/request_controller.rb
parentf58a35dc2cfff3a1559523376a750905c77d5c29 (diff)
Sort the incoming and outgoing requests by date before display
Diffstat (limited to 'app/controllers/request_controller.rb')
-rw-r--r--app/controllers/request_controller.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/controllers/request_controller.rb b/app/controllers/request_controller.rb
index 82cf76cc8..65ab168e9 100644
--- a/app/controllers/request_controller.rb
+++ b/app/controllers/request_controller.rb
@@ -4,13 +4,14 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: request_controller.rb,v 1.7 2007-10-30 14:03:27 francis Exp $
+# $Id: request_controller.rb,v 1.8 2007-10-30 14:13:46 francis Exp $
class RequestController < ApplicationController
def show
@info_request = InfoRequest.find(params[:id])
@correspondences = @info_request.outgoing_messages + @info_request.incoming_messages
+ @correspondences.sort! { |a,b| a.sent_at <=> b.sent_at }
end
def list