Skip to content

Commit f35f47e

Browse files
authored
Include Calculations module instead of prepending (#928)
Another gem (groupdate) also patches the #calculate method and prepending this module prevents any other libraries from patching this method.
1 parent ace9588 commit f35f47e

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
@@ -43,5 +43,5 @@ def build_count_subquery(relation, column_name, distinct)
4343

4444
ActiveSupport.on_load(:active_record) do
4545
mod = ActiveRecord::ConnectionAdapters::SQLServer::CoreExt::Calculations
46-
ActiveRecord::Relation.prepend(mod)
46+
ActiveRecord::Relation.include(mod)
4747
end

0 commit comments

Comments
 (0)