<%= form_for @synapse1, url: synapses_url do |form| %>

Add Synapse Between Groups

<%= hidden_field_tag(:category, "Group") %> <% if @allgroups.count > 0 %> <%= select_tag :node1_id, options_from_collection_for_select(@allgroups, "id", "name") %> <% end %> <%= form.text_field :desc, class: "description" %> <% if @allgroups.count > 0 %> <%= select_tag :node2_id, options_from_collection_for_select(@allgroups, "id", "name") %> <% end %> <%= form.submit "Add Synapse", class: "add" %> <% end %> <%= form_for @synapse2, url: synapses_url do |form| %>

Add Synapse Between People

<%= hidden_field_tag(:category, "Person") %> <% if @allpeople.count > 0 %> <%= select_tag :node1_id, options_from_collection_for_select(@allpeople, "id", "name") %> <% end %> <%= form.text_field :desc, class: "description" %> <% if @allpeople.count > 0 %> <%= select_tag :node2_id, options_from_collection_for_select(@allpeople, "id", "name") %> <% end %> <%= form.submit "Add Synapse", class: "add" %> <% end %> <%= form_for @synapse3, url: synapses_url do |form| %>

Add Synapse Between Items

<%= hidden_field_tag(:category, "Item") %> <% if @allitems.count > 0 %> <%= select_tag :node1_id, options_from_collection_for_select(@allitems, "id", "name") %> <% end %> <%= form.text_field :desc, class: "description" %> <% if @allitems.count > 0 %> <%= select_tag :node2_id, options_from_collection_for_select(@allitems, "id", "name") %> <% end %> <%= form.submit "Add Synapse", class: "add" %> <% end %>