Class: NodesController
- Inherits:
-
MVCLI::Controller
- Object
- MVCLI::Controller
- NodesController
- Defined in:
- app/controllers/nodes_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
# File 'app/controllers/nodes_controller.rb', line 18 def create template = Nodes::CreateForm argv = MVCLI::Argv.new command.argv form = template.new argv. form.validate! n = nodes n.load_balancer = load_balancer = { address: form.address, condition: form.condition, port: form.port, type: form.type } n.create end |
#destroy ⇒ Object
35 36 37 38 39 40 |
# File 'app/controllers/nodes_controller.rb', line 35 def destroy n = nodes n.load_balancer = load_balancer find_node_in(n).destroy params[:id] end |
#index ⇒ Object
6 7 8 9 10 |
# File 'app/controllers/nodes_controller.rb', line 6 def index n = nodes n.load_balancer = load_balancer n.all end |
#show ⇒ Object
12 13 14 15 16 |
# File 'app/controllers/nodes_controller.rb', line 12 def show n = nodes n.load_balancer = load_balancer find_node_in n end |