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 22 23 24 25 26 27 |
# File 'app/controllers/instances_controller.rb', line 14 def create template = Instances::CreateForm argv = MVCLI::Argv.new command.argv form = template.new argv. form.validate! #How expansive do we want these command line options to be? = { name: form.name, flavor_id: form.flavor, volume_size: form.size } instances.create end |
#destroy ⇒ Object
29 30 31 32 33 |
# File 'app/controllers/instances_controller.rb', line 29 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.reload end |