diff options
Diffstat (limited to 'app/models/outgoing_message.rb')
-rw-r--r-- | app/models/outgoing_message.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/app/models/outgoing_message.rb b/app/models/outgoing_message.rb new file mode 100644 index 000000000..186bb2147 --- /dev/null +++ b/app/models/outgoing_message.rb @@ -0,0 +1,23 @@ +# models/outgoing_message.rb: +# A message, associated with a request, from the user of the site to somebody +# else. e.g. An initial request for information, or a complaint. +# +# 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.1 2007-09-10 18:58:43 francis Exp $ + +class OutgoingMessage < ActiveRecord::Base + belongs_to :info_request + validates_presence_of :info_request_id + + validates_presence_of :body + validates_inclusion_of :status, :in => ['ready', 'sent', 'failed'] + + belongs_to :public_body + validates_inclusion_of :message_type, :in => ['initial_request'] #, 'complaint'] + + belongs_to :recipient, :polymorphic => true + +end + |