Class: AsyncRequest::JobsController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- AsyncRequest::JobsController
- Defined in:
- app/controllers/async_request/jobs_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
5 6 7 8 9 10 |
# File 'app/controllers/async_request/jobs_controller.rb', line 5 def show return render_invalid_token unless valid_token? job = Job.find_by(id: token[:job_id]) return head :not_found if job.blank? job.finished? ? render_finished_job(job) : render_pending end |