Collection_select doesn't let me select when multiple => true | بلاگ

Collection_select doesn't let me select when multiple => true

تعرفه تبلیغات در سایت

آخرین مطالب

امکانات وب

Vote count: 0

This is the template with multiple => true, but when i remove the multiple the selection tray works perfectly and takes in a single value. What i need is multiple options to be selected and to be stored in the confirer_string as a string.

<%= form_with(model: @base, local: true) do |form| %>
  <%= form.label :description %>
  <%= form.text_field :description, id: :base_tbl_description %>

  <%= form.label :confirer_string %>
  <%= form.collection_select(:confirer_string, Confirmer.all , :position, :name,{ :prompt => "Please select" }, { :multiple => true } ) %>

  <%= form.submit %>
<% end %>

Is it a problem since i'm not using id's but integer fields. And one more thing :confirer_string is of type string.

asked 1 min ago
gunder gobi

...
نویسنده : استخدام کار بازدید : 8 تاريخ : دوشنبه 23 بهمن 1396 ساعت: 23:53