diff options
author | Louise Crow <louise.crow@gmail.com> | 2013-12-18 19:08:08 +0000 |
---|---|---|
committer | Louise Crow <louise.crow@gmail.com> | 2014-01-13 12:36:41 +0000 |
commit | bfd1a71eeb4962996db5b226a976558b9f7a50bd (patch) | |
tree | db2c48f19a5dced92b978aa3d7fca70c32896932 /app/models/info_request.rb | |
parent | 6bd51ecc137c3366ebfb83951b99ac3c50512c1f (diff) |
Clean up admin index
Refactor a bit so it's easier to read.
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r-- | app/models/info_request.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 0a073dc79..7c5ce6388 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -1275,6 +1275,12 @@ public return [request_events, request_events_all_successful] end + def InfoRequest.find_in_state(state) + find(:all, :select => '*, ' + last_event_time_clause + ' as last_event_time', + :conditions => ["described_state = ?", state], + :order => "last_event_time") + end + private def set_defaults |