Permalink
Browse files

use the predicate method

  • Loading branch information...
tenderlove committed Jul 23, 2013
1 parent fe820a7 commit 6e24d501d3a84a59feb8ed37ed71759ed8a96995
Showing with 1 addition and 1 deletion.
  1. +1 −1 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

@rajcybage

This comment has been minimized.

Show comment
Hide comment
Contributor

rajcybage commented on 6e24d50 Jul 23, 2013

Please sign in to comment.