diff options
author | Michael Koziarski <michael@koziarski.com> | 2008-02-09 08:24:35 +0000 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2008-02-09 08:24:35 +0000 |
commit | 3df052ac601186fb9f4b40a33c56b50524402249 (patch) | |
tree | 64604dd13b3f79dcab5da1ad623f9a61073a227a | |
parent | cadb087deb76e477d5bf557bd3ca67c569095706 (diff) | |
download | rails-3df052ac601186fb9f4b40a33c56b50524402249.tar.gz rails-3df052ac601186fb9f4b40a33c56b50524402249.tar.bz2 rails-3df052ac601186fb9f4b40a33c56b50524402249.zip |
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
-rwxr-xr-x | activerecord/lib/active_record/validations.rb | 11 |
1 files changed, 0 insertions, 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!) |