class method self.update_formatter

Ruby on Rails 7.2.3.2

Since v7.1.6 Last seen in v7.2.3.2

Available in: v7.1.6 v7.2.3.2

Signature

self.update_formatter(format)

Updates the formatter to be what the passed in format is.

Parameters

format req
Source
# File activerecord/lib/active_record/query_logs.rb, line 104
      def update_formatter(format)
        self.tags_formatter =
          case format
          when :legacy
            LegacyFormatter.new
          when :sqlcommenter
            SQLCommenter.new
          else
            raise ArgumentError, "Formatter is unsupported: #{formatter}"
          end
      end

Defined in activerecord/lib/active_record/query_logs.rb line 104 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::QueryLogs

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close