Method: Rack::WebProfiler::Controller#show_toolbar

Defined in:
lib/rack/web_profiler/controller.rb

#show_toolbar(token) ⇒ Rack::Response

Print the webprofiler toolbar.

Parameters:

  • token (String)

    The collection token

Returns:

  • (Rack::Response)


60
61
62
63
64
65
66
67
# File 'lib/rack/web_profiler/controller.rb', line 60

def show_toolbar(token)
  @collection = Rack::WebProfiler::Model::CollectionRecord[token: token]
  return erb nil, status: 404 if @collection.nil?

  @collectors = Rack::WebProfiler.config.collectors.all

  erb "profiler.erb"
end