Sha256: 94101c35319d025cee29d9187e77daa4fda87c6c512ea95c974b76baa1632bf8

Contents?: true

Size: 463 Bytes

Versions: 4

Compression:

Stored size: 463 Bytes

Contents

# frozen_string_literal: true
module GoodJob
  class ExecutionsController < GoodJob::ApplicationController
    def index
      @filter = ExecutionsFilter.new(params)
    end

    def destroy
      deleted_count = GoodJob::Execution.where(id: params[:id]).delete_all
      message = deleted_count.positive? ? { notice: "Job execution deleted" } : { alert: "Job execution not deleted" }
      redirect_back fallback_location: root_path, **message
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
good_job-2.13.0 engine/app/controllers/good_job/executions_controller.rb
good_job-2.12.2 engine/app/controllers/good_job/executions_controller.rb
good_job-2.12.1 engine/app/controllers/good_job/executions_controller.rb
good_job-2.12.0 engine/app/controllers/good_job/executions_controller.rb