Select_tag with multiple set to true returns a String in params instead of array

Hi - I’m trying to get a multi-select box working. The form shows up
fine, and I can select multiple items fine, but in the controller, the
parameter shows up as a single string, instead of an array of values.
Any ideas?

The form:

<%=select_tag “items”, @items, :multiple => true :onchange =>

The form goes to function update_items in the controller, which fires
just fine. But params[:items] is a single string value.

Thanks in advance for any help.


On May 5, 4:07 pm, “dino d.” [email protected] wrote:

use “items[]” for the first parameter ? (I though rails might do this
automatically, obviously not)


awesome, fixed. thanks fred.

On May 5, 11:42 am, Frederick C. [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs