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 a4bb02e commit 3d33375Copy full SHA for 3d33375
lib/active_record/connection_adapters/sqlserver/core_ext/calculations.rb
@@ -10,9 +10,9 @@ module CoreExt
10
module Calculations
11
12
private
13
-
+
14
def build_count_subquery(relation, column_name, distinct)
15
- klass.with_connection do |connection|
+ self.model.with_connection do |connection|
16
relation = relation.unscope(:order) if connection.sqlserver?
17
super(relation, column_name, distinct)
18
end
0 commit comments