diff options
author | francis <francis> | 2007-09-11 15:26:11 +0000 |
---|---|---|
committer | francis <francis> | 2007-09-11 15:26:11 +0000 |
commit | 110e3892264a136fb2ee0e4d11bede15ddaca4f3 (patch) | |
tree | 24879613a4a54247e9bd8797052715ea515b6c76 /app/models | |
parent | 5f27823f513d12cb798b8b0b2c7cb603aa07ed62 (diff) |
Fix up some broken constraints.
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/outgoing_message.rb | 5 | ||||
-rw-r--r-- | app/models/user.rb | 4 |
2 files changed, 3 insertions, 6 deletions
diff --git a/app/models/outgoing_message.rb b/app/models/outgoing_message.rb index 07a916b73..ef768955d 100644 --- a/app/models/outgoing_message.rb +++ b/app/models/outgoing_message.rb @@ -5,7 +5,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.2 2007-09-11 06:42:40 francis Exp $ +# $Id: outgoing_message.rb,v 1.3 2007-09-11 15:26:12 francis Exp $ class OutgoingMessage < ActiveRecord::Base belongs_to :info_request @@ -15,8 +15,5 @@ class OutgoingMessage < ActiveRecord::Base validates_inclusion_of :status, :in => ['ready', 'sent', 'failed'] validates_inclusion_of :message_type, :in => ['initial_request'] #, 'complaint'] - - belongs_to :recipient, :polymorphic => true - end diff --git a/app/models/user.rb b/app/models/user.rb index adf2d1592..75397b33b 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -4,7 +4,7 @@ # Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved. # Email: francis@mysociety.org; WWW: http://www.mysociety.org/ # -# $Id: user.rb,v 1.4 2007-09-11 15:23:59 francis Exp $ +# $Id: user.rb,v 1.5 2007-09-11 15:26:12 francis Exp $ require 'digest/sha1' @@ -14,7 +14,7 @@ class User < ActiveRecord::Base validates_presence_of :name - has_many :user + has_many :info_request attr_accessor :password_confirmation validates_confirmation_of :password |