Skip to content

Commit 9f5313d

Browse files
committed
Fixed monkey-patch
1 parent 94261fe commit 9f5313d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/active_record/connection_adapters/sqlserver/core_ext/calculations.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def _calculate(operation, column_name)
4141
if operation == "count"
4242
unless distinct_value || distinct_select?(column_name || select_for_count)
4343
relation.distinct!
44-
relation.select_values = [ klass.primary_key || table[Arel.star] ]
44+
relation.select_values = Array(klass.primary_key || table[Arel.star])
4545
end
4646
# PostgreSQL: ORDER BY expressions must appear in SELECT list when using DISTINCT
4747
# Start of monkey-patch

0 commit comments

Comments
 (0)