Sha256: ff7b03511d175045d05dacce6781ad10cbeee90c4a515d968cea2499997fad61

Contents?: true

Size: 1.15 KB

Versions: 4

Compression:

Stored size: 1.15 KB

Contents

# frozen_string_literal: true

GoodJob::Engine.routes.draw do
  root 'jobs#redirect_to_index'

  resources :jobs, only: %i[index show destroy] do
    collection do
      get :mass_update, to: redirect(path: 'jobs')
      put :mass_update
    end

    member do
      put :discard
      put :force_discard
      put :reschedule
      put :retry
    end
  end
  get 'jobs/metrics/primary_nav', to: 'metrics#primary_nav', as: :metrics_primary_nav
  get 'jobs/metrics/job_status', to: 'metrics#job_status', as: :metrics_job_status

  resources :batches, only: %i[index show] do
    member do
      put :retry
    end
  end

  resources :cron_entries, only: %i[index show], param: :cron_key do
    member do
      post :enqueue
      put :enable
      put :disable
    end
  end

  resources :processes, only: %i[index]
  resources :performance, only: %i[index show]
  resources :cleaner, only: %i[index]

  scope :frontend, controller: :frontends, defaults: { version: GoodJob::VERSION.tr(".", "-") } do
    get "modules/:version/:id", action: :module, as: :frontend_module, constraints: { format: 'js' }
    get "static/:version/:id", action: :static, as: :frontend_static
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
good_job-4.7.0 config/routes.rb
good_job-4.6.0 config/routes.rb
good_job-4.5.1 config/routes.rb
good_job-4.5.0 config/routes.rb