diff options
author | francis <francis> | 2008-03-06 20:10:29 +0000 |
---|---|---|
committer | francis <francis> | 2008-03-06 20:10:29 +0000 |
commit | 092d674f2c1825be04b65c4e9b9de8fc10fe44f6 (patch) | |
tree | b0092008b732ff45c76767a27fb3b59304147622 /app/models/info_request.rb | |
parent | 823e7007405e506ade10c22f99d2fca35826189e (diff) |
Pagination of search results.
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r-- | app/models/info_request.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 89f5c8259..9bff40a60 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -21,7 +21,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: info_request.rb,v 1.56 2008-03-06 19:05:42 francis Exp $ +# $Id: info_request.rb,v 1.57 2008-03-06 20:10:29 francis Exp $ require 'digest/sha1' @@ -362,7 +362,8 @@ public if outgoing_messages.empty? # mainly for use with incomplete fixtures return "" end - excerpt = outgoing_messages[0].body + messages = self.outgoing_messages.find(:all, :order => "created_at") + excerpt = messages[0].body excerpt.sub!(/Dear .+,/, "") return excerpt end |