Class: InstancesController
- Inherits:
-
MVCLI::Controller
- Object
- MVCLI::Controller
- InstancesController
- Defined in:
- app/controllers/instances_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'app/controllers/instances_controller.rb', line 14 def create = { name: naming.generate_name('d', 'i'), flavor_id: 1, volume_size: 1, } instances.create end |
#destroy ⇒ Object
23 24 25 26 27 |
# File 'app/controllers/instances_controller.rb', line 23 def destroy instance.tap do |i| i.destroy end end |
#index ⇒ Object
6 7 8 |
# File 'app/controllers/instances_controller.rb', line 6 def index instances.all end |
#show ⇒ Object
10 11 12 |
# File 'app/controllers/instances_controller.rb', line 10 def show instance end |