Class: IntegrationPal::JobsController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- IntegrationPal::JobsController
- Defined in:
- app/controllers/integration_pal/jobs_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /jobs.
-
#destroy ⇒ Object
DELETE /jobs/1.
-
#edit ⇒ Object
GET /jobs/1/edit.
-
#index ⇒ Object
GET /jobs.
-
#new ⇒ Object
GET /jobs/new.
-
#show ⇒ Object
GET /jobs/1.
-
#update ⇒ Object
PATCH/PUT /jobs/1.
Methods inherited from ApplicationController
Instance Method Details
#create ⇒ Object
POST /jobs
26 27 28 29 30 31 32 33 34 |
# File 'app/controllers/integration_pal/jobs_controller.rb', line 26 def create @job = Job.new(job_params) if @job.save redirect_to @job, notice: 'Job was successfully created.' else render :new end end |
#destroy ⇒ Object
DELETE /jobs/1
46 47 48 49 |
# File 'app/controllers/integration_pal/jobs_controller.rb', line 46 def destroy @job.destroy redirect_to jobs_url, notice: 'Job was successfully destroyed.' end |
#edit ⇒ Object
GET /jobs/1/edit
22 23 |
# File 'app/controllers/integration_pal/jobs_controller.rb', line 22 def edit end |
#index ⇒ Object
GET /jobs
8 9 10 |
# File 'app/controllers/integration_pal/jobs_controller.rb', line 8 def index @jobs = Job.order('created_at DESC') end |
#new ⇒ Object
GET /jobs/new
17 18 19 |
# File 'app/controllers/integration_pal/jobs_controller.rb', line 17 def new @job = Job.new end |
#show ⇒ Object
GET /jobs/1
13 14 |
# File 'app/controllers/integration_pal/jobs_controller.rb', line 13 def show end |
#update ⇒ Object
PATCH/PUT /jobs/1
37 38 39 40 41 42 43 |
# File 'app/controllers/integration_pal/jobs_controller.rb', line 37 def update if @job.update(job_params) redirect_to @job, notice: 'Job was successfully updated.' else render :edit end end |