Skip to content

Instantly share code, notes, and snippets.

@mh-github
Created June 1, 2017 19:40
Show Gist options
  • Select an option

  • Save mh-github/4ffa2e4137a0c933db92abd4fd7559c4 to your computer and use it in GitHub Desktop.

Select an option

Save mh-github/4ffa2e4137a0c933db92abd4fd7559c4 to your computer and use it in GitHub Desktop.
<script>
$(document).ready(function() {
$("select#ema").select2();
});
</script>
<br>
<div class="field" id="recipients_selection">
<%= f.label "Or send to select emails from employee database" %><br>
<%= select_tag :bulk_mail_recipients, options_from_collection_for_select(@employees, :id, :email), id: :ema, :multiple => :multiple, :multiple => true, :style => "width:800px;", data: {placeholder: "Choose an email"} %>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment