Class: Afterparty::DashboardController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Afterparty::DashboardController
- Defined in:
- app/controllers/afterparty/dashboard_controller.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
22 23 24 25 26 |
# File 'app/controllers/afterparty/dashboard_controller.rb', line 22 def destroy @job.destroy flash[:notice] = "You have successfully destroyed job ##{@job.id}." redirect_to afterparty_engine.dashboard_path end |
#index ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'app/controllers/afterparty/dashboard_controller.rb', line 7 def index @queues = Afterparty.queues if params[:completed] @jobs = AfterpartyJob.completed.limit(20) else @jobs = queue.jobs end end |
#run ⇒ Object
16 17 18 19 20 |
# File 'app/controllers/afterparty/dashboard_controller.rb', line 16 def run queue.run @job flash[:notice] = "You successfully completed job ##{@job.id}." redirect_to afterparty_engine.dashboard_path(completed: true) end |