Class: AttachmentsController

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

Instance Method Summary collapse

Instance Method Details

#attachObject



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

def attach
  form = get_form Attachments::AttachDetachShowForm

  server.attach_volume form.volume
end

#detachObject



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

def detach
  form = get_form Attachments::AttachDetachShowForm

  attachment( form.volume).detach
end

#indexObject



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

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



26
27
28
29
30
# File 'app/controllers/attachments_controller.rb', line 26

def show
  form = get_form Attachments::AttachDetachShowForm

  attachment(form.volume)
end