Module: ActiveRecord::Railties::ControllerRuntime

Defined in:
lib/time_bandits/monkey_patches/active_record/railties/controller_runtime.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#append_info_to_payload(payload) ⇒ Object



13
14
15
16
17
18
# File 'lib/time_bandits/monkey_patches/active_record/railties/controller_runtime.rb', line 13

def append_info_to_payload(payload)
  super
  if ActiveRecord::Base.connected?
    payload[:db_runtime] = TimeBandits::TimeConsumers::Database.instance.consumed
  end
end

#cleanup_view_runtimeObject



7
8
9
10
# File 'lib/time_bandits/monkey_patches/active_record/railties/controller_runtime.rb', line 7

def cleanup_view_runtime
  # this method has been redefined to do nothing for activerecord on purpose
  super
end