pockestrap

Programmer's memo

2020-12-15から1日間の記事一覧

Active Recordのクエリの実行元の表示から、特定のパスを除外する

TL;DR ActiveRecord::LogSubscriber.backtrace_cleaner = Rails::BacktraceCleaner.new.tap do |c| c.add_silencer { |line| line.include?('path/to/meaningless/file.rb') } end Problem Active Recordにはクエリの実行元をログに表示する機能があります。…