Permalink
Browse files

Fix small bug which was shown by the last commit

  • Loading branch information...
1 parent 1e2525b commit d619e399380cd840f9f5ec88bb3d823fbb1f4d08 @jonleighton jonleighton committed Oct 15, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/associations.rb
@@ -2246,7 +2246,7 @@ def join_relation(joining_relation)
end
def table
- if reflection.macro == :has_and_belongs_to_many
+ if @tables.last.is_a?(Array)
@tables.last.first
else
@tables.last

0 comments on commit d619e39

Please sign in to comment.