Skip to content

Commit bb1d257

Browse files
authored
ActiveRecord db patch: support kwargs (#649)
This change follows the newrelic inspiration that the original of this file was linking to.
1 parent 647b03f commit bb1d257

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/patches/db/activerecord.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ def self.included(instrumented_class)
1515
end
1616
end
1717

18-
def log_with_miniprofiler(*args, &block)
19-
return log_without_miniprofiler(*args, &block) unless SqlPatches.should_measure?
18+
def log_with_miniprofiler(*args, **kwargs, &block)
19+
return log_without_miniprofiler(*args, **kwargs, &block) unless SqlPatches.should_measure?
2020

2121
sql, name, binds = args
2222
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
23-
rval = log_without_miniprofiler(*args, &block)
23+
rval = log_without_miniprofiler(*args, **kwargs, &block)
2424

2525
# Don't log schema queries if the option is set
2626
return rval if Rack::MiniProfiler.config.skip_schema_queries && name =~ (/SCHEMA/)

0 commit comments

Comments
 (0)