Class: ActiveRecord::LogSubscriber
- Inherits:
-
Object
- Object
- ActiveRecord::LogSubscriber
- Includes:
- Flog::PayloadValueShuntable
- Defined in:
- lib/flog/sql_formattable.rb
Instance Method Summary collapse
Methods included from Flog::PayloadValueShuntable
Instance Method Details
#sql_with_flog(event) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/flog/sql_formattable.rb', line 8 def sql_with_flog(event) return sql_without_flog(event) unless Flog::Status.enabled? formatted = format_sql(event.payload[:sql]) shunt_payload_value(event.payload, :sql, "\n\t#{formatted}") do sql_without_flog(event) end end |