diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/info_request.rb | 19 | ||||
-rw-r--r-- | app/models/info_request_event.rb | 3 |
2 files changed, 11 insertions, 11 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index 4d1d577dc..0f3fa4e39 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -22,7 +22,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.66 2008-03-15 04:19:04 francis Exp $ +# $Id: info_request.rb,v 1.67 2008-03-16 23:32:11 francis Exp $ require 'digest/sha1' @@ -45,6 +45,7 @@ class InfoRequest < ActiveRecord::Base validates_inclusion_of :described_state, :in => [ 'waiting_response', 'waiting_clarification', + 'not_held', 'rejected', 'successful', 'partially_successful', @@ -243,14 +244,10 @@ public end end - # Work out what the situation of the request is + # Work out what the situation of the request is In addition to values of + # self.described_state, can take these two values: # waiting_classification - # waiting_response - # waiting_response_overdue # XXX calculated, should be cached for display? - # waiting_clarification - # rejected - # successful - # partially_successful + # waiting_response_overdue def calculate_status if self.awaiting_description return 'waiting_classification' @@ -450,10 +447,12 @@ public "Awaiting response." elsif status == 'waiting_response_overdue' "Response overdue." - elsif status == 'partially_successful' - "Partially successful." + elsif status == 'not_held' + "Information not held." elsif status == 'rejected' "Rejected." + elsif status == 'partially_successful' + "Partially successful." elsif status == 'successful' "Successful." elsif status == 'waiting_clarification' diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb index e8d6098ee..4e55aa0be 100644 --- a/app/models/info_request_event.rb +++ b/app/models/info_request_event.rb @@ -16,7 +16,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: info_request_event.rb,v 1.20 2008-03-12 16:07:13 francis Exp $ +# $Id: info_request_event.rb,v 1.21 2008-03-16 23:32:11 francis Exp $ class InfoRequestEvent < ActiveRecord::Base belongs_to :info_request @@ -38,6 +38,7 @@ class InfoRequestEvent < ActiveRecord::Base nil, 'waiting_response', 'waiting_clarification', + 'not_held', 'rejected', 'successful', 'partially_successful', |