From: Tom Hughes Date: Thu, 25 Feb 2010 21:50:09 +0000 (+0000) Subject: Remove validates_associated_of calls which target the user model as X-Git-Tag: live~6371^2~17 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/9deeae3f9630bb85fc420a9eb09edb6318d32f09 Remove validates_associated_of calls which target the user model as we have a number of users with minor validation failures. --- diff --git a/app/models/changeset.rb b/app/models/changeset.rb index 803cbb52f..d13974fd9 100644 --- a/app/models/changeset.rb +++ b/app/models/changeset.rb @@ -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 diff --git a/app/models/diary_entry.rb b/app/models/diary_entry.rb index 20acd962e..0524b75cf 100644 --- a/app/models/diary_entry.rb +++ b/app/models/diary_entry.rb @@ -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 diff --git a/app/models/message.rb b/app/models/message.rb index 98346d7c7..053c7a4c0 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -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