Sha256: 8bb3ad6f5f325d6d06e6a66eab38a02a3876133e22497b306d065b07a439bf17

Contents?: true

Size: 403 Bytes

Versions: 1

Compression:

Stored size: 403 Bytes

Contents

module QueryDiet
  module ActiveRecordExt
    if RUBY_VERSION >= '3'
      def log(query, *, **)
        QueryDiet::Logger.log(query) { super }
      end
    else
      def log(query, *)
        QueryDiet::Logger.log(query) { super }
      end
    end
  end
end

ActiveSupport.on_load(:active_record) do
  ActiveRecord::ConnectionAdapters::AbstractAdapter.send(:prepend, QueryDiet::ActiveRecordExt)
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
query_diet-0.7.2 lib/query_diet/active_record_ext.rb