diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/info_request.rb | 7 | ||||
-rw-r--r-- | app/models/info_request_event.rb | 3 |
2 files changed, 8 insertions, 2 deletions
diff --git a/app/models/info_request.rb b/app/models/info_request.rb index cf50bf986..5a352026e 100644 --- a/app/models/info_request.rb +++ b/app/models/info_request.rb @@ -19,7 +19,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.40 2008-02-14 15:31:22 francis Exp $ +# $Id: info_request.rb,v 1.41 2008-02-15 11:18:55 francis Exp $ require 'digest/sha1' @@ -47,6 +47,11 @@ class InfoRequest < ActiveRecord::Base 'partially_successful' ] + validates_inclusion_of :prominence, :in => [ + 'normal', + 'backpage', + ] + def after_initialize if self.described_state.nil? self.described_state = 'waiting_response' diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb index ebd03d855..a8c2c7f50 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.14 2008-02-14 15:31:22 francis Exp $ +# $Id: info_request_event.rb,v 1.15 2008-02-15 11:18:55 francis Exp $ class InfoRequestEvent < ActiveRecord::Base belongs_to :info_request @@ -27,6 +27,7 @@ class InfoRequestEvent < ActiveRecord::Base 'sent', 'resent', 'followup_sent', + 'edit', # title etc. edited in admin interface 'edit_outgoing', # outgoing message edited in admin interface 'manual', # you did something in the db by hand 'response' |