title: Using a multi select list in rails
body: <p>I'm trying to make a multi select list box in Rails. My view code is:</p>
  
  <pre><code>&lt;div&gt;
    &lt;%=nested_form_for(@allocation) do|builder|%&gt;
      &lt;%=builder.label :song_id, "Pick a song" %&gt;
  
      &lt;%=builder.select :song_id, options_for_select(
      Song.all.collect {|s| [ [s.title, s.artist].join(" by "), s.id ] }, 
      { include_blank: true, multiple: true, size: 5 }) %&gt;
  
      &lt;%=builder.submit "Add Song", class: "btn btn-large btn-primary" %&gt;
    &lt;% end %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>At the moment I just have the normal single selectbox but I want to convert this to a multiselect. Any pointers would be much appreciated. Thanks in advance</p>