Class: Delayed::Web::JobsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Delayed::Web::JobsController
- Defined in:
- app/controllers/delayed/web/jobs_controller.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/delayed/web/jobs_controller.rb', line 15 def destroy if job.can_destroy? job.destroy flash[:notice] = t(:notice, scope: 'delayed/web.flashes.jobs.destroyed') else status = t(job.status, scope: 'delayed/web.views.statuses') flash[:alert] = t(:alert, scope: 'delayed/web.flashes.jobs.destroyed', status: status) end redirect_to jobs_path end |
#queue ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'app/controllers/delayed/web/jobs_controller.rb', line 4 def queue if job.can_queue? job.queue! flash[:notice] = t(:notice, scope: 'delayed/web.flashes.jobs.queued') else status = t(job.status, scope: 'delayed/web.views.statuses') flash[:alert] = t(:alert, scope: 'delayed/web.flashes.jobs.queued', status: status) end redirect_to jobs_path end |