Class: Perchfall::Rails::SyntheticRunsController
- Inherits:
-
Object
- Object
- Perchfall::Rails::SyntheticRunsController
- Includes:
- Pagy::Method
- Defined in:
- app/controllers/perchfall/rails/synthetic_runs_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
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 |
#show ⇒ Object
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 |