Skip to content

Commit 1660f53

Browse files
committed
Revert "Don't remove the select values to add they back again"
This reverts commit 0785008. Reason: MySQL tests are broken with this change because STI information seems to be lost. We will apply a fix only on master for this.
1 parent 54f836e commit 1660f53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activerecord/lib/active_record/relation/finder_methods.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ def construct_relation_for_association_calculations
222222
end
223223

224224
def construct_relation_for_association_find(join_dependency)
225-
relation = except(:includes, :eager_load, :preload).select(join_dependency.columns)
225+
relation = except(:includes, :eager_load, :preload, :select).select(join_dependency.columns + select_values)
226226
apply_join_dependency(relation, join_dependency)
227227
end
228228

0 commit comments

Comments
 (0)