Class: Perchfall::Rails::SyntheticRunsController

Inherits:
Object
  • Object
show all
Includes:
Pagy::Method
Defined in:
app/controllers/perchfall/rails/synthetic_runs_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



8
9
10
11
12
13
# File 'app/controllers/perchfall/rails/synthetic_runs_controller.rb', line 8

def index
  runs = SyntheticRun.recent
  runs = runs.for_status(params[:status]) if SyntheticRun::STATUSES.include?(params[:status])
  runs = runs.for_url(params[:url])       if params[:url].present?
  @pagy, @runs = pagy(:offset, runs)
end

#showObject



15
16
17
18
19
# File 'app/controllers/perchfall/rails/synthetic_runs_controller.rb', line 15

def show
  @run = SyntheticRun.find(params[:id])
rescue ActiveRecord::RecordNotFound
  head :not_found
end