Skip to content
Browse files

use the predicate method

  • Loading branch information...
1 parent fe820a7 commit 6e24d501d3a84a59feb8ed37ed71759ed8a96995 @tenderlove tenderlove committed Jul 22, 2013
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/reflection.rb
View
2 activerecord/lib/active_record/reflection.rb
@@ -580,7 +580,7 @@ def source_macro
# 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

1 comment on commit 6e24d50

Please sign in to comment.
Something went wrong with that request. Please try again.