aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations/through_association.rb
diff options
context:
space:
mode:
authorJon Leighton <j@jonathanleighton.com>2011-01-02 14:42:17 +0000
committerAaron Patterson <aaron.patterson@gmail.com>2011-01-03 16:24:31 -0800
commit4e194ed1e68c13901f486334a5a1e9f509b10722 (patch)
treec11aa6b9e3df716b1319bd1108099f5117449016 /activerecord/lib/active_record/associations/through_association.rb
parenta0be389d39b790e0625339251d2674b8250b16b1 (diff)
downloadrails-4e194ed1e68c13901f486334a5a1e9f509b10722.tar.gz
rails-4e194ed1e68c13901f486334a5a1e9f509b10722.tar.bz2
rails-4e194ed1e68c13901f486334a5a1e9f509b10722.zip
Rename AssociationProxy#foreign_key_present to foreign_key_present?
Diffstat (limited to 'activerecord/lib/active_record/associations/through_association.rb')
-rw-r--r--activerecord/lib/active_record/associations/through_association.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations/through_association.rb b/activerecord/lib/active_record/associations/through_association.rb
index 0d83b46130..2b28dda363 100644
--- a/activerecord/lib/active_record/associations/through_association.rb
+++ b/activerecord/lib/active_record/associations/through_association.rb
@@ -152,7 +152,7 @@ module ActiveRecord
end
end
- def foreign_key_present
+ def foreign_key_present?
@reflection.through_reflection.macro == :belongs_to &&
!@owner[@reflection.through_reflection.foreign_key].nil?
end