From 3df052ac601186fb9f4b40a33c56b50524402249 Mon Sep 17 00:00:00 2001 From: Michael Koziarski Date: Sat, 9 Feb 2008 08:24:35 +0000 Subject: Remove misleading / incorrect warning from validation documentation. Closes #8241 [quixoten, pedz, tom] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8825 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activerecord/lib/active_record/validations.rb | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb index c49684dceb..5824cd8b6f 100755 --- a/activerecord/lib/active_record/validations.rb +++ b/activerecord/lib/active_record/validations.rb @@ -477,17 +477,6 @@ module ActiveRecord # not occur (e.g. :unless => :skip_validation, or :unless => Proc.new { |user| user.signup_step <= 2 }). The # method, proc or string should return or evaluate to a true or false value. # - # === Warning - # Validate the presence of the foreign key, not the instance variable itself. - # Do this: - # validates_presence_of :invoice_id - # - # Not this: - # validates_presence_of :invoice - # - # If you validate the presence of the associated object, you will get - # failures on saves when both the parent object and the child object are - # new. def validates_presence_of(*attr_names) configuration = { :message => ActiveRecord::Errors.default_error_messages[:blank], :on => :save } configuration.update(attr_names.extract_options!) -- cgit v1.2.3