diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/outgoing_message.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/models/outgoing_message.rb b/app/models/outgoing_message.rb index 8560f70bd..d83f9314a 100644 --- a/app/models/outgoing_message.rb +++ b/app/models/outgoing_message.rb @@ -21,7 +21,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: outgoing_message.rb,v 1.72 2008-11-05 18:19:46 francis Exp $ +# $Id: outgoing_message.rb,v 1.73 2008-11-07 01:03:14 francis Exp $ class OutgoingMessage < ActiveRecord::Base belongs_to :info_request @@ -32,8 +32,6 @@ class OutgoingMessage < ActiveRecord::Base belongs_to :incoming_message_followup, :foreign_key => 'incoming_message_followup_id', :class_name => 'IncomingMessage' - validates_inclusion_of :what_doing, :in => ['new_information', 'internal_review', 'normal_sort'] - # can have many events, for items which were resent by site admin e.g. if # contact address changed has_many :info_request_events @@ -119,7 +117,8 @@ class OutgoingMessage < ActiveRecord::Base if self.body =~ /#{get_signoff}\s*\Z/ms errors.add(:body, '^Please sign at the bottom with your name, or alter the "' + get_signoff + '" signature') end - if self.what_doing.nil? + if self.what_doing.nil? || !['new_information', 'internal_review', 'normal_sort'].include?(self.what_doing) + errors.add(:what_doing_dummy, '^Please choose what sort of reply you are making.') end end |