Sha256: 7ea3852830cf72233287c464c745339a92f32ea99c4eba50adcd28c0bf652d1f

Contents?: true

Size: 305 Bytes

Versions: 6

Compression:

Stored size: 305 Bytes

Contents

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

6 entries across 6 versions & 1 rubygems

Version Path
good_job-1.11.2 engine/app/controllers/good_job/jobs_controller.rb
good_job-1.11.1 engine/app/controllers/good_job/jobs_controller.rb
good_job-1.11.0 engine/app/controllers/good_job/jobs_controller.rb
good_job-1.10.1 engine/app/controllers/good_job/jobs_controller.rb
good_job-1.10.0 engine/app/controllers/good_job/jobs_controller.rb
good_job-1.9.6 engine/app/controllers/good_job/jobs_controller.rb