diff options
author | Jon Leighton <j@jonathanleighton.com> | 2010-10-15 16:27:13 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2010-10-15 16:27:13 +0100 |
commit | d619e399380cd840f9f5ec88bb3d823fbb1f4d08 (patch) | |
tree | 4eb3c205b0a63bb087938061d1b9a0a4de34dbad | |
parent | 1e2525bfe0248d873d6d6026f45102853a1c95cd (diff) | |
download | rails-d619e399380cd840f9f5ec88bb3d823fbb1f4d08.tar.gz rails-d619e399380cd840f9f5ec88bb3d823fbb1f4d08.tar.bz2 rails-d619e399380cd840f9f5ec88bb3d823fbb1f4d08.zip |
Fix small bug which was shown by the last commit
-rw-r--r-- | activerecord/lib/active_record/associations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 2a72fa95c9..22a693540e 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -2246,7 +2246,7 @@ module ActiveRecord end def table - if reflection.macro == :has_and_belongs_to_many + if @tables.last.is_a?(Array) @tables.last.first else @tables.last |