aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-11-30 16:42:21 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2010-11-30 16:42:21 -0800
commit39f5fc06cb5661b93275e3f7bf98e63b98b57550 (patch)
treed423d29caca9eba2e70f8036763c1446a31bb8f3 /activerecord
parent22b01c52c7cccdaa7f4fbed2a66c38a4c5416c6e (diff)
downloadrails-39f5fc06cb5661b93275e3f7bf98e63b98b57550.tar.gz
rails-39f5fc06cb5661b93275e3f7bf98e63b98b57550.tar.bz2
rails-39f5fc06cb5661b93275e3f7bf98e63b98b57550.zip
just call join_sql against the manager object
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/relation.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation.rb b/activerecord/lib/active_record/relation.rb
index 45fc3c20c2..bebdd1292c 100644
--- a/activerecord/lib/active_record/relation.rb
+++ b/activerecord/lib/active_record/relation.rb
@@ -371,7 +371,7 @@ module ActiveRecord
def references_eager_loaded_tables?
# always convert table names to downcase as in Oracle quoted table names are in uppercase
- joined_tables = (tables_in_string(arel.joins(arel)) + [table.name, table.table_alias]).compact.map{ |t| t.downcase }.uniq
+ joined_tables = (tables_in_string(arel.join_sql) + [table.name, table.table_alias]).compact.map{ |t| t.downcase }.uniq
(tables_in_string(to_sql) - joined_tables).any?
end