Skip to content

Instantly share code, notes, and snippets.

@jalex79
Created March 28, 2012 12:05
Show Gist options
  • Save jalex79/2225681 to your computer and use it in GitHub Desktop.
Save jalex79/2225681 to your computer and use it in GitHub Desktop.
Em um Select HTML, selecionar lista de opções
<div class="field">
<%= f.label 'Unidades' %><br />
<%= select_tag(:unidades, options_for_select(@unidades.map {|s| [s.nome, s.codigo]}, @unidades_selecionadas), :multiple => true, :size => 6 ) %><input type="checkbox" id="selecionar_todas_unidades"/>todos</p>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment