module Rails::DataMapper::Railties::ControllerRuntime

Protected Instance Methods

append_info_to_payload(payload) click to toggle source
Calls superclass method
# File lib/dm-rails/railties/controller_runtime.rb, line 25
def append_info_to_payload(payload)
  super
  payload[:db_runtime] = db_runtime
end
cleanup_view_runtime() click to toggle source
Calls superclass method
# File lib/dm-rails/railties/controller_runtime.rb, line 15
def cleanup_view_runtime
  # TODO add checks if DataMapper is connected to a repository.
  # If it is, do this, if it isn't, just delegate to super
  db_rt_before_render = ::DataMapper::Railties::LogSubscriber.reset_runtime
  runtime = super
  db_rt_after_render = ::DataMapper::Railties::LogSubscriber.reset_runtime
  self.db_runtime = db_rt_before_render + db_rt_after_render
  runtime - db_rt_after_render
end