active_record_query_trace
https://github.com/brunofacca/active-record-query-trace
code:ruby
# $ cat config/initializers/active_record_query_trace.rb
if Rails.env.development?
ActiveRecordQueryTrace.enabled = true
ActiveRecordQueryTrace.level = :full
ActiveRecordQueryTrace.lines = 0
end