module EasyProfiler::ActionControllerExtensions::InstanceMethods

Public Instance Methods

dump_firebug_profile() click to toggle source
# File lib/easy_prof/action_controller_extensions.rb, line 23
def dump_firebug_profile
  return if firebug_logger.logs.empty?

  logs = firebug_logger.logs.collect do |message|
    # We have to add any escape characters
    "console.info('#{self.class.helpers.escape_javascript(message)}');"
  end.join("\n")

  response.body << self.class.helpers.javascript_tag(logs)
end
firebug_logger() click to toggle source

Exposes firebug variable where logs can be submitted.

class UserController < ApplicationController
  def index
    firebug.debug 'Why I can be easily debugging with this thing!'
  end
end
# File lib/easy_prof/action_controller_extensions.rb, line 19
def firebug_logger
  @_firebug_logger ||= FirebugLogger.new
end