Class: VolumesController
- Inherits:
-
MVCLI::Controller
- Object
- MVCLI::Controller
- VolumesController
- Defined in:
- app/controllers/volumes_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'app/controllers/volumes_controller.rb', line 13 def create template = Volumes::CreateForm argv = MVCLI::Argv.new command.argv form = template.new argv. form.validate! = { display_name: form.name, volume_type: form.type, size: form.size } volumes.create end |
#destroy ⇒ Object
27 28 29 30 31 32 |
# File 'app/controllers/volumes_controller.rb', line 27 def destroy #Must be detached from servers volume.tap do |v| v.destroy end end |
#index ⇒ Object
5 6 7 |
# File 'app/controllers/volumes_controller.rb', line 5 def index volumes.all end |
#show ⇒ Object
9 10 11 |
# File 'app/controllers/volumes_controller.rb', line 9 def show volume end |