aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/association_proxy.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/associations/association_proxy.rb')
-rw-r--r--activerecord/lib/active_record/associations/association_proxy.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/associations/association_proxy.rb b/activerecord/lib/active_record/associations/association_proxy.rb
index 65fef81d64..e86f4c0283 100644
--- a/activerecord/lib/active_record/associations/association_proxy.rb
+++ b/activerecord/lib/active_record/associations/association_proxy.rb
@@ -270,7 +270,7 @@ module ActiveRecord
def load_target
return nil unless defined?(@loaded)
- if !loaded? && (!@owner.new_record? || foreign_key_present) && @scope
+ if !loaded? && (!@owner.new_record? || foreign_key_present?) && @scope
@target = find_target
end
@@ -287,7 +287,7 @@ module ActiveRecord
#
# Currently implemented by belongs_to (vanilla and polymorphic) and
# has_one/has_many :through associations which go through a belongs_to
- def foreign_key_present
+ def foreign_key_present?
false
end