app/controllers/panoptic/jobs/failed_controller.rb in panoptic-0.4.2 vs app/controllers/panoptic/jobs/failed_controller.rb in panoptic-0.5.0

- old
+ new

@@ -11,7 +11,18 @@ end def show @job = Panoptic::FailedJob.find(params[:id]) end + + def destroy + @job = Panoptic::FailedJob.find(params[:id]) + if @job.destroy + redirect_back fallback_location: failed_jobs_path, + notice: "Job was successfully deleted." + else + redirect_back fallback_location: failed_jobs_path, + alert: @job.errors.full_messages.to_sentence + end + end end end