aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorGannon McGibbon <gannon.mcgibbon@gmail.com>2018-11-09 14:53:56 -0500
committerGitHub <noreply@github.com>2018-11-09 14:53:56 -0500
commit27b3b4666c19d0dfbba0f86d3686a416bd447655 (patch)
treeaeeebc1ce14ee0502c543e7c6f5c1d896a4094c5 /guides/source
parente0f82a0fb3b46b63fc4a9f668defdba31b6d8b36 (diff)
parente53d2325d52f42c4646696a4db7af472c3a1ec7b (diff)
downloadrails-27b3b4666c19d0dfbba0f86d3686a416bd447655.tar.gz
rails-27b3b4666c19d0dfbba0f86d3686a416bd447655.tar.bz2
rails-27b3b4666c19d0dfbba0f86d3686a416bd447655.zip
Merge pull request #34415 from Ana06/present_associations
Clarify the validation of present associations
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/active_record_validations.md3
1 files changed, 2 insertions, 1 deletions
diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md
index c98f24d786..0fda7c5cfd 100644
--- a/guides/source/active_record_validations.md
+++ b/guides/source/active_record_validations.md
@@ -538,7 +538,8 @@ end
If you want to be sure that an association is present, you'll need to test
whether the associated object itself is present, and not the foreign key used
-to map the association.
+to map the association. This way, it is not only checked that the foreign key
+is not empty but also that the referenced object exists.
```ruby
class LineItem < ApplicationRecord