Skip to content

Instantly share code, notes, and snippets.

@senny
Created July 29, 2014 12:24
Show Gist options
  • Save senny/21455a10b0aa7f7e60bb to your computer and use it in GitHub Desktop.
Save senny/21455a10b0aa7f7e60bb to your computer and use it in GitHub Desktop.
grouped select
<%= form_tag "#" do %>
<%= select_tag "name", grouped_options_for_select("Group 1" => ["value 1", "value 2"], "Group 2" => ["value 3", "value 4"]) %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment