We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84f81f5 commit 36d7bd1Copy full SHA for 36d7bd1
activerecord/lib/active_record/relation/finder_methods.rb
@@ -188,7 +188,8 @@ def exists?(id = nil)
188
def find_with_associations
189
including = (@eager_load_values + @includes_values).uniq
190
join_dependency = ActiveRecord::Associations::ClassMethods::JoinDependency.new(@klass, including, [])
191
- rows = construct_relation_for_association_find(join_dependency).to_a
+ relation = construct_relation_for_association_find(join_dependency)
192
+ rows = connection.exec_query(relation.to_sql, 'SQL', relation.bind_values)
193
join_dependency.instantiate(rows)
194
rescue ThrowResult
195
[]
0 commit comments