aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-11-07 19:57:43 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-11-07 19:57:43 -0200
commit688d9374c33afc2a3df50f2b1f4cebc077cd96ae (patch)
tree38c9783e1194f2dc9186fc59bf8afa7160b00fed /activerecord
parent69ba5b46df3f5166d694a102e81839c6e4a02604 (diff)
downloadrails-688d9374c33afc2a3df50f2b1f4cebc077cd96ae.tar.gz
rails-688d9374c33afc2a3df50f2b1f4cebc077cd96ae.tar.bz2
rails-688d9374c33afc2a3df50f2b1f4cebc077cd96ae.zip
Use cached quoted_table_name instead of going through the connection
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/relation/finder_methods.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb
index 008738bfd9..14e46306c4 100644
--- a/activerecord/lib/active_record/relation/finder_methods.rb
+++ b/activerecord/lib/active_record/relation/finder_methods.rb
@@ -225,7 +225,7 @@ module ActiveRecord
def construct_limited_ids_condition(relation)
orders = relation.order_values.map { |val| val.presence }.compact
- values = @klass.connection.distinct("#{@klass.connection.quote_table_name table_name}.#{primary_key}", orders)
+ values = @klass.connection.distinct("#{quoted_table_name}.#{primary_key}", orders)
relation = relation.dup