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



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

def index
  runs = resolved_synthetic_runs_scope
  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



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

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