Class: AsyncRequest::JobsController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/async_request/jobs_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



3
4
5
6
7
# File 'app/controllers/async_request/jobs_controller.rb', line 3

def show
  job = Job.find_by(uid: params[:id])
  return head :not_found unless job.present?
  job.processed? ? render_finished_job(job) : render_pending(job)
end