Class: BuildsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/builds_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#view_context

Instance Method Details

#createObject



18
19
20
21
# File 'app/controllers/builds_controller.rb', line 18

def create
  resource = @job.enqueue
  respond_with resource, location: [@job, resource]
end

#destroyObject



27
28
29
# File 'app/controllers/builds_controller.rb', line 27

def destroy
  respond_with @resource.destroy
end

#indexObject



10
11
12
# File 'app/controllers/builds_controller.rb', line 10

def index
  respond_with @resources
end

#showObject



14
15
16
# File 'app/controllers/builds_controller.rb', line 14

def show
  respond_with @resource
end

#updateObject



23
24
25
# File 'app/controllers/builds_controller.rb', line 23

def update
  respond_with @resource.update_attributes(params.permit(:status))
end