A recently-merged update to ActiveRecord now causes the adapter context to be brought in when query transformers are being called. Here is the relevant method in AbstractAdapter, note the addition of the parameter self:
def transform_query(sql)
ActiveRecord.query_transformers.each do |transformer|
sql = transformer.call(sql, self)
end
sql
end
A recently-merged update to ActiveRecord now causes the adapter context to be brought in when query transformers are being called. Here is the relevant method in AbstractAdapter, note the addition of the parameter
self
:It's part of this commit: https://github.com/rails/rails/commit/d3b41750fb308662a9871139e6cd39849b0c03d8