aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeeraj Singh <neerajdotname@gmail.com>2013-05-23 10:57:31 -0400
committerNeeraj Singh <neerajdotname@gmail.com>2013-05-23 10:59:41 -0400
commit14f70dfae144f917f099266082cc7a7c9dd065e4 (patch)
tree129f512c82e26a2bf6c2e8c58301060fa7443032
parent54ce21ee8d59835dba8fa167ad79490fbba0ca17 (diff)
downloadrails-14f70dfae144f917f099266082cc7a7c9dd065e4.tar.gz
rails-14f70dfae144f917f099266082cc7a7c9dd065e4.tar.bz2
rails-14f70dfae144f917f099266082cc7a7c9dd065e4.zip
enhanced comments for foreign_key_present? method
-rw-r--r--activerecord/lib/active_record/associations/association.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations/association.rb b/activerecord/lib/active_record/associations/association.rb
index 608a6af16c..ee62298793 100644
--- a/activerecord/lib/active_record/associations/association.rb
+++ b/activerecord/lib/active_record/associations/association.rb
@@ -200,13 +200,14 @@ module ActiveRecord
creation_attributes.each { |key, value| record[key] = value }
end
- # Should be true if there is a foreign key present on the owner which
+ # Returns true if there is a foreign key present on the owner which
# references the target. This is used to determine whether we can load
# the target if the owner is currently a new record (and therefore
- # without a key).
+ # without a key). If the owner is a new record then foreign_key must
+ # be present in order to load target.
#
# Currently implemented by belongs_to (vanilla and polymorphic) and
- # has_one/has_many :through associations which go through a belongs_to
+ # has_one/has_many :through associations which go through a belongs_to.
def foreign_key_present?
false
end