Module: ActiveRecord::Railties::ControllerRuntime::ClassMethods
- Defined in:
- lib/active_record/railties/controller_runtime.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#log_process_action(payload) ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/active_record/railties/controller_runtime.rb', line 12 def log_process_action(payload) , db_runtime = super, payload[:db_runtime] if db_runtime queries_count = payload[:queries_count] || 0 cached_queries_count = payload[:cached_queries_count] || 0 << ("ActiveRecord: %.1fms (%d %s, %d cached)" % [db_runtime.to_f, queries_count, "query".pluralize(queries_count), cached_queries_count]) end end |