metamaps--metamaps/app/views/synapses/edit.html.erb
2012-10-09 20:23:45 -04:00

14 lines
No EOL
696 B
Text

<%= form_for @synapse, url: synapse_url do |form| %>
<h3>Edit Synapse</h3>
<% if @collection.count > 0 %>
<label for="node1_id">Choose First <%= @synapse.category %></label>
<%= select "node1_id", "node1", @collection.map {|p| [ p.name, p.id ] }, { :selected => @synapse.node1_id } %>
<% end %>
<label for="item_desc">Describe The Connection</label>
<%= form.text_field :desc, class: "description" %>
<% if @collection.count > 0 %>
<label for="node2_id">Choose Second <%= @synapse.category %></label>
<%= select "node2_id", "node2", @collection.map {|p| [ p.name, p.id ] }, { :selected => @synapse.node2_id } %>
<% end %>
<%= form.submit "Update", class: "update" %>
<% end %>