mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Use cached quoted_table_name instead of going through the connection
This commit is contained in:
parent
69ba5b46df
commit
688d9374c3
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue