aboutsummaryrefslogtreecommitdiffstats
path: root/app/models/info_request.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r--app/models/info_request.rb7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index a31d20a59..2208de90e 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -23,7 +23,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.178 2009-03-17 09:53:58 tony Exp $
+# $Id: info_request.rb,v 1.179 2009-04-03 15:28:58 louise Exp $
require 'digest/sha1'
require File.join(File.dirname(__FILE__),'../../vendor/plugins/acts_as_xapian/lib/acts_as_xapian')
@@ -537,6 +537,11 @@ public
return nil
end
+ def last_event_id_needing_description
+ last_event = events_needing_description[-1]
+ last_event.nil? ? 0 : last_event.id
+ end
+
# Returns all the events which the user hasn't described yet - an empty array if all described.
def events_needing_description
events = self.info_request_events