Module: EasyProfiler::ActionControllerExtensions::InstanceMethods
- Defined in:
- lib/easy_prof/action_controller_extensions.rb
Instance Method Summary collapse
- #dump_firebug_profile ⇒ Object
-
#firebug_logger ⇒ Object
Exposes firebug variable where logs can be submitted.
Instance Method Details
#dump_firebug_profile ⇒ Object
23 24 25 26 27 28 29 30 31 32 |
# 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 || # We have to add any escape characters "console.info('#{self.class.helpers.escape_javascript()}');" end.join("\n") response.body << self.class.helpers.javascript_tag(logs) end |
#firebug_logger ⇒ Object
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
19 20 21 |
# File 'lib/easy_prof/action_controller_extensions.rb', line 19 def firebug_logger @_firebug_logger ||= FirebugLogger.new end |