Class: Rearview::JobsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Rearview::JobsController
- Defined in:
- app/controllers/rearview/jobs_controller.rb
Instance Method Summary collapse
- #create ⇒ Object
- #data ⇒ Object
- #destroy ⇒ Object
- #errors ⇒ Object
- #index ⇒ Object
- #reset ⇒ Object
- #show ⇒ Object
- #update ⇒ Object
Instance Method Details
#create ⇒ Object
13 14 15 16 |
# File 'app/controllers/rearview/jobs_controller.rb', line 13 def create upsert(allowed_create_params) render :show end |
#data ⇒ Object
39 40 41 42 43 44 |
# File 'app/controllers/rearview/jobs_controller.rb', line 39 def data @job_data = Rearview::Job.find(params[:id]).try(:job_data) unless @job_data.present? head :status => 404 end end |
#destroy ⇒ Object
23 24 25 26 27 |
# File 'app/controllers/rearview/jobs_controller.rb', line 23 def destroy @job = Rearview::Job.find(params[:id]) @job.destroy render :show end |
#errors ⇒ Object
46 47 48 |
# File 'app/controllers/rearview/jobs_controller.rb', line 46 def errors @job_errors = Rearview::JobError.calculate_durations(Rearview::JobError.search(params).load) end |
#index ⇒ Object
5 6 7 8 9 10 11 |
# File 'app/controllers/rearview/jobs_controller.rb', line 5 def index @jobs = if params[:dashboard_id].present? Rearview::Job.where(:app_id=>params[:dashboard_id]) else Rearview::Job.all end end |
#reset ⇒ Object
29 30 31 32 33 |
# File 'app/controllers/rearview/jobs_controller.rb', line 29 def reset @job = Rearview::Job.find(params[:id]) @job.reset render :show end |
#show ⇒ Object
35 36 37 |
# File 'app/controllers/rearview/jobs_controller.rb', line 35 def show @job = Rearview::Job.find(params[:id]) end |
#update ⇒ Object
18 19 20 21 |
# File 'app/controllers/rearview/jobs_controller.rb', line 18 def update upsert(allowed_update_params) render :show end |