Module: Mongoid::Railties::ControllerRuntime::ControllerExtension::ClassMethods

Defined in:
build/mongoid-master/lib/mongoid/railties/controller_runtime.rb

Instance Method Summary collapse

Instance Method Details

#log_process_action(payload) ⇒ Object

Append MongoDB runtime information to ActionController runtime log message.



44
45
46
47
48
49
# File 'build/mongoid-master/lib/mongoid/railties/controller_runtime.rb', line 44

def log_process_action(payload)
  messages = super
  mongoid_runtime = payload[:mongoid_runtime]
  messages << ("MongoDB: %.1fms" % mongoid_runtime.to_f) if mongoid_runtime
  messages
end