Select_tag problem or a seve (me) problem?

I’m trying to use the select_tag with :multiple => true and when it
posts to the server it’s generating “—” followed by a “-” and each
selected option. I have no idea what I’m doing wrong… Any help is
appreciated.

Code in the view:

<%= select_tag ‘restaurant[holidays][]’, options_for_select
([“Independence Day”, “Thanksgiving”, “Christmas Eve”, “Christmas
Day”, “New Years Eve”, “New Years Day”]), :multiple => true %>

After making the selections I end up with this in the log:

“holidays” = '—

  • Independence Day
  • Thanksgiving
  • Christmas Eve
  • Christmas Day
  • New Years Day

HTML rendered from said action:

— - Independence Day - Thanksgiving - Christmas Eve - Christmas Day

  • New Years Day

Cheers,
Seve

The — part is the list of selected holidays in YAML - what kind of
field are you saving them to?

–Matt J.

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