title: rails Multiple selector from an array
body: <p>I would like to create a multiple selection field, the values are stored in an array and not in a database, I managed to select several values and they are saved in a database but they are saved as a string instead of an array.</p>
  
  <p>How can I retrieve them when I edit my profile?</p>
  
  <pre><code>@spoken_languages_datas = [["Allemand", 0], ["Anglais", 1], ["Anglais ( Australien )", 2], ["Anglais ( Royaume Uni )", 3], ["Arabe", 4], ["Chinois", 5], ["Espagnol", 6], ["Espagnol ( Chili )", 7], ["Danois", 8], ["Finlandais", 9], ["Français", 10], ["Français ( Canada )", 11], ["Grec  ", 12], ["Italien", 13], ["Japonais", 14], ["Portugais", 15], ["Portugais ( Brésil )", 16], ["Néerlandais", 17], ["Norvégien", 18], ["Russe", 19], ["Suédois", 20], ["Turc", 21]]
  </code></pre>
  
  <p>my form :</p>
  
  <pre><code>.row
    .col-6
      = form.label :spoken_languages, @spoken_languages_title
      = form.select(:spoken_languages, @spoken_languages_datas.each { |p| [p] }, {prompt: 'Select a language'}, {multiple: true, size: @spoken_languages_datas.count, style: 'height: 125px;'})
  </code></pre>
  
  <p>values once stored in the database:</p>
  
  <pre><code>"[\"\", \"0\", \"1\", \"2\", \"3\"]"
  </code></pre>