aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/reflection.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-07-22 18:46:49 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2013-07-22 18:46:56 -0700
commit6e24d501d3a84a59feb8ed37ed71759ed8a96995 (patch)
tree82151fd169e876d60aac4cff3aac427dc66409c0 /activerecord/lib/active_record/reflection.rb
parentfe820a772ddb6d079603f1d187b6239762141229 (diff)
downloadrails-6e24d501d3a84a59feb8ed37ed71759ed8a96995.tar.gz
rails-6e24d501d3a84a59feb8ed37ed71759ed8a96995.tar.bz2
rails-6e24d501d3a84a59feb8ed37ed71759ed8a96995.zip
use the predicate method
Diffstat (limited to 'activerecord/lib/active_record/reflection.rb')
-rw-r--r--activerecord/lib/active_record/reflection.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/reflection.rb b/activerecord/lib/active_record/reflection.rb
index 471ed13a1c..dac8bd7650 100644
--- a/activerecord/lib/active_record/reflection.rb
+++ b/activerecord/lib/active_record/reflection.rb
@@ -580,7 +580,7 @@ module ActiveRecord
# A through association is nested if there would be more than one join table
def nested?
- chain.length > 2 || through_reflection.macro == :has_and_belongs_to_many
+ chain.length > 2 || through_reflection.has_and_belongs_to_many?
end
# We want to use the klass from this reflection, rather than just delegate straight to