Class: AttachmentsController

Inherits:
MVCLI::Controller
  • Object
show all
Defined in:
app/controllers/attachments_controller.rb

Instance Method Summary collapse

Instance Method Details

#attachObject



12
13
14
# File 'app/controllers/attachments_controller.rb', line 12

def attach
  server.attach_volume volume
end

#detachObject



16
17
18
19
# File 'app/controllers/attachments_controller.rb', line 16

def detach
  id = volume.id
  attachment(id).detach
end

#indexObject



5
6
7
8
9
10
# File 'app/controllers/attachments_controller.rb', line 5

def index
  #Maybe it would be best to give better information about the
  #attachments?
  #Maybe list the volume information rather than attachment info
  server.attachments.all
end

#showObject



21
22
23
24
# File 'app/controllers/attachments_controller.rb', line 21

def show
  id = volume.id
  attachment id
end