method

call

rails latest stable - Class: ActiveRecord::Assertions::QueryAssertions::SQLCounter

Method not available on this version

This method is only available on newer versions. The first available version (v7.2.3) is shown here.

call(*, payload)
public

No documentation available.

# File activerecord/lib/active_record/testing/query_assertions.rb, line 103
        def call(*, payload)
          return if payload[:cached]

          sql = payload[:sql]
          @log_all << sql

          unless payload[:name] == "SCHEMA"
            bound_values = (payload[:binds] || []).map do |value|
              value = value.value_for_database if value.respond_to?(:value_for_database)
              value
            end

            @log_full << [sql, bound_values]
          end
        end