• O
    Log call site for all queries · 3876defd
    Olivier Lacan 提交于
    This new ActiveRecord configuration option allows you to easily
    pinpoint what line of application code is triggering SQL queries in the
    development log by appending below each SQL statement log the line of
    Ruby code that triggered it.
    
    It’s useful with N+1 issues, and to locate stray queries.
    
    By default this new option ignores Rails and Ruby code in order to
    surface only callers from your application Ruby code or your gems.
    
    It is enabled on newly generated Rails 5.2 applications and can be
    enabled on existing Rails applications:
    
    ```ruby
    Rails.application.configure do
      # ...
      config.active_record.verbose_query_logs = true
    end
    ```
    
    The `rails app:upgrade` task will also add it to
    `config/development.rb`.
    
    This feature purposely avoids coupling with
    ActiveSupport::BacktraceCleaner since ActiveRecord can be used without
    ActiveRecord. This decision can be reverted in the future to allow more
    configurable backtraces (the exclusion of gem callers for example).
    3876defd
可在Tags中查看这些版本中当前仓库的状态.
CHANGELOG.md 16.2 KB