Class: SpeedupRails::ResultsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/speedup_rails/results_controller.rb

Instance Method Summary collapse

Instance Method Details

#rubyprofObject



16
17
18
# File 'app/controllers/speedup_rails/results_controller.rb', line 16

def rubyprof
  send_file Rails.root.join('tmp', 'rubyprof', params[:id] + params[:prof_id].to_s + '.html'), :type => 'text/html', :disposition => 'inline'
end

#showObject



4
5
6
7
8
9
10
11
12
13
14
# File 'app/controllers/speedup_rails/results_controller.rb', line 4

def show
  @request_id = params[:id]
  @request = Speedup::Request.get(@request_id)
  if @request
    @collectors = Speedup.collectors
    @redirect = params[:redirect]
    render layout: false
  else
    render nothing: true, status: :not_found
  end
end