0

The following isn't displaying a multiple select in Firefox:

<%= f.select :days, days_of_week_for_select, { selected: '0' }, multple: 'true' %>

The html produced is:

<div class="col-12 col-md-10">
<select multple="true" rows="5" name="series[days]" id="series_days">
<option value="0">Sunday</option>
<option value="1">Monday</option>
<option value="2">Tuesday</option>
<option value="3">Wednesday</option>
<option value="4">Thursday</option>
<option value="5">Friday</option>
<option value="6">Saturday</option>
</select>   
</div>

And the helper:

  def days_of_week_for_select
    array = Date::DAYNAMES.each_with_index.map { |day, ind| [day, ind] }
    options_for_select array
  end

The select list is a normal, single select, not multiple.

1 Answer 1

2

It should be multiple: true instead of multple: true. You are missing a character in that option :)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.