diff options
author | Karthik Krishnan <info@karthiks.in> | 2008-12-20 20:52:48 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-12-20 21:08:51 +0000 |
commit | 75a133f92ff7e27b83032babf829d8a58803bb3c (patch) | |
tree | b6d68bff1f29febd1eb3b91987d6aaff9a4963fc /activerecord/lib/active_record/associations/has_many_through_association.rb | |
parent | c092dbef50ba207174a94b7e0beb7782a3d86649 (diff) | |
download | rails-75a133f92ff7e27b83032babf829d8a58803bb3c.tar.gz rails-75a133f92ff7e27b83032babf829d8a58803bb3c.tar.bz2 rails-75a133f92ff7e27b83032babf829d8a58803bb3c.zip |
Fix has many through not quoting table names [#1163 state:resolved]
Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com>
Diffstat (limited to 'activerecord/lib/active_record/associations/has_many_through_association.rb')
-rw-r--r-- | activerecord/lib/active_record/associations/has_many_through_association.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/associations/has_many_through_association.rb b/activerecord/lib/active_record/associations/has_many_through_association.rb index a0bb3a45b0..2eeeb28d1f 100644 --- a/activerecord/lib/active_record/associations/has_many_through_association.rb +++ b/activerecord/lib/active_record/associations/has_many_through_association.rb @@ -160,9 +160,9 @@ module ActiveRecord end "INNER JOIN %s ON %s.%s = %s.%s %s #{@reflection.options[:joins]} #{custom_joins}" % [ - @reflection.through_reflection.table_name, - @reflection.table_name, reflection_primary_key, - @reflection.through_reflection.table_name, source_primary_key, + @reflection.through_reflection.quoted_table_name, + @reflection.quoted_table_name, reflection_primary_key, + @reflection.through_reflection.quoted_table_name, source_primary_key, polymorphic_join ] end |