Class: JobsController
- Inherits:
-
ApplicationController
- Object
- ActionController::API
- ApplicationController
- JobsController
- Defined in:
- app/controllers/jobs_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
7 8 9 |
# File 'app/controllers/jobs_controller.rb', line 7 def index render json: current_entity.jobs end |
#pop ⇒ Object
3 4 5 |
# File 'app/controllers/jobs_controller.rb', line 3 def pop render json: Job.pop end |
#show ⇒ Object
11 12 13 |
# File 'app/controllers/jobs_controller.rb', line 11 def show render json: current_entity.jobs.find(params[:id]), show_all: true end |
#update_status ⇒ Object
15 16 17 18 |
# File 'app/controllers/jobs_controller.rb', line 15 def update_status Job.find_by!(key: params[:id]).update!(status: params[:status]) render plain: 'OK' end |