]> git.openstreetmap.org Git - rails.git/commitdiff
Remove validates_associated_of calls which target the user model as
authorTom Hughes <tom@compton.nu>
Thu, 25 Feb 2010 21:50:09 +0000 (21:50 +0000)
committerTom Hughes <tom@compton.nu>
Thu, 25 Feb 2010 21:50:09 +0000 (21:50 +0000)
we have a number of users with minor validation failures.

app/models/changeset.rb
app/models/diary_entry.rb
app/models/message.rb

index 803cbb52f1a0e22c2cd37cee805176aeea607c94..d13974fd992e9e281b1a3c231b7fce5cad6bfe34 100644 (file)
@@ -19,7 +19,6 @@ class Changeset < ActiveRecord::Base
   validates_numericality_of :min_lat, :max_lat, :min_lon, :max_lat, :allow_nil => true, :integer_only => true
   validates_numericality_of :user_id,  :integer_only => true
   validates_numericality_of :num_changes, :integer_only => true, :greater_than_or_equal_to => 0
-  validates_associated :user
 
   # over-expansion factor to use when updating the bounding box
   EXPAND = 0.1
index 20acd962e72d1140f27938e3760e2c82bedfd6e5..0524b75cf3a0616938da05ce8a27531fabb3b30b 100644 (file)
@@ -20,6 +20,5 @@ class DiaryEntry < ActiveRecord::Base
                             :greater_than_or_equal_to => -90, :less_than_or_equal_to => 90
   validates_numericality_of :longitude, :allow_nil => true,
                             :greater_than_or_equal_to => -180, :less_than_or_equal_to => 180
-  validates_associated :user
   validates_associated :language
 end
index 98346d7c7231f4c1f7d5f44738313ebeea61c5e2..053c7a4c0fffaa4382ce6bab58bb6ed73ffef300 100644 (file)
@@ -7,7 +7,6 @@ class Message < ActiveRecord::Base
   validates_presence_of :title, :body, :sent_on, :sender, :recipient
   validates_length_of :title, :within => 1..255
   validates_inclusion_of :message_read, :in => [ true, false ]
-  validates_associated :sender, :recipient
   validates_as_utf8 :title
 
   def digest