<%= form_for @group, url: group_url do |form| %>

Edit Group

<%= form.text_field :name, label: "Name", class: "name" %> <%= form.text_area :desc, label: "Description", class: "description", :rows => 5 %> <%= form.text_field :link, label: "Link", class: "link" %> <%= form.text_field :city, class: "city" %> <%= form.text_field :province, class: "province" %> <%= form.text_field :country, class: "country" %> <% if @ingroups1.count > 0 %> <%= select_tag "ingroups1", options_from_collection_for_select(@ingroups1, "id", "name"), { :multiple => true } %> <% else %>
<%= select_tag "ingroups1", options_from_collection_for_select(@ingroups1, "id", "name"), { :multiple => true } %>
<% end %> <% if @outgroups1.count > 0 %> <%= select_tag "outgroups1", options_from_collection_for_select(@outgroups1, "id", "name"), { :multiple => true } %> <% else %>
<%= select_tag "outgroups1", options_from_collection_for_select(@outgroups1, "id", "name"), { :multiple => true } %>
<% end %> <% if @ingroups2.count > 0 %> <%= select_tag "ingroups2", options_from_collection_for_select(@ingroups2, "id", "name"), { :multiple => true } %> <% else %>
<%= select_tag "ingroups2", options_from_collection_for_select(@ingroups2, "id", "name"), { :multiple => true } %>
<% end %> <% if @outgroups2.count > 0 %> <%= select_tag "outgroups2", options_from_collection_for_select(@outgroups2, "id", "name"), { :multiple => true } %> <% else %>
<%= select_tag "outgroups2", options_from_collection_for_select(@outgroups2, "id", "name"), { :multiple => true } %>
<% end %> <%= form.submit "Update", class: "update" %> <% end %>