From e366aa57a78d3b2d951bf4630a8d437ab8e18cfd Mon Sep 17 00:00:00 2001 From: francis Date: Thu, 11 Sep 2008 10:37:37 +0000 Subject: Factor out an SQL fragment. --- app/models/info_request.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'app/models/info_request.rb') diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 28d82e989..b98eb1f64 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.136 2008-09-02 17:59:40 francis Exp $ +# $Id: info_request.rb,v 1.137 2008-09-11 10:37:37 francis Exp $ require 'digest/sha1' require File.join(File.dirname(__FILE__),'../../vendor/plugins/acts_as_xapian/lib/acts_as_xapian') @@ -678,6 +678,12 @@ public end end + # Used to find when event last changed + def InfoRequest.last_event_time_clause + '(select created_at from info_request_events where info_request_events.info_request_id = info_requests.id order by created_at desc limit 1)' + end + + end -- cgit v1.2.3