diff options
author | francis <francis> | 2008-03-16 23:32:10 +0000 |
---|---|---|
committer | francis <francis> | 2008-03-16 23:32:10 +0000 |
commit | bf903b558f43d9b3bfbb10852aa7141a4f8e74bb (patch) | |
tree | abc4b1e68c7453ec6a59f11c99797207ed778def /app/models/info_request.rb | |
parent | d6094c0cf222c76f523ec4e02826054df8283463 (diff) |
Explicity option to say the body does not hold the information (this is
actually separate from rejection in the act, and is a genuinely needed
user interface option for when the public authority tells people to send
the request elsehwere0
Diffstat (limited to 'app/models/info_request.rb')
-rw-r--r-- | app/models/info_request.rb | 19 |
1 files changed, 9 insertions, 10 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' |