module Marginalia::ActionControllerInstrumentation
Public Class Methods
included(instrumented_class)
click to toggle source
# File lib/marginalia.rb, line 97 def self.included(instrumented_class) instrumented_class.class_eval do if respond_to?(:around_action) around_action :record_query_comment else around_filter :record_query_comment end end end
Public Instance Methods
record_query_comment() { || ... }
click to toggle source
# File lib/marginalia.rb, line 107 def record_query_comment Marginalia::Comment.update!(self) yield ensure Marginalia::Comment.clear! end