Sha256: 6fa4bdb0405f78a4d1bc4ae79425013eccf0e534c7aad7cfa5348a34c0c024a4

Contents?: true

Size: 335 Bytes

Versions: 17

Compression:

Stored size: 335 Bytes

Contents

# frozen_string_literal: true
module GoodJob
  class JobsController < GoodJob::BaseController
    def destroy
      deleted_count = GoodJob::Job.where(id: params[:id]).delete_all
      message = deleted_count.positive? ? { notice: "Job deleted" } : { alert: "Job not deleted" }
      redirect_to root_path, **message
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
good_job-1.99.2 engine/app/controllers/good_job/jobs_controller.rb
good_job-2.1.0 engine/app/controllers/good_job/jobs_controller.rb
good_job-2.0.5 engine/app/controllers/good_job/jobs_controller.rb
good_job-2.0.4 engine/app/controllers/good_job/jobs_controller.rb
good_job-2.0.3 engine/app/controllers/good_job/jobs_controller.rb
good_job-2.0.2 engine/app/controllers/good_job/jobs_controller.rb
good_job-1.99.1 engine/app/controllers/good_job/jobs_controller.rb
good_job-2.0.1 engine/app/controllers/good_job/jobs_controller.rb
good_job-2.0.0 engine/app/controllers/good_job/jobs_controller.rb
good_job-1.99.0 engine/app/controllers/good_job/jobs_controller.rb
good_job-1.13.2 engine/app/controllers/good_job/jobs_controller.rb
good_job-1.13.1 engine/app/controllers/good_job/jobs_controller.rb
good_job-1.13.0 engine/app/controllers/good_job/jobs_controller.rb
good_job-1.12.2 engine/app/controllers/good_job/jobs_controller.rb
good_job-1.12.1 engine/app/controllers/good_job/jobs_controller.rb
good_job-1.12.0 engine/app/controllers/good_job/jobs_controller.rb
good_job-1.11.3 engine/app/controllers/good_job/jobs_controller.rb