time_select is not disabled

Hi, I have a problem with rails time_select. I want to disable
time_select while page load.

<%= h.time_select dow + "_start_time",{minute_step: 15, ampm: true},
{class: 'test', disabled: ''} %>

generated html is

<select class="" name="account[start_time(4i)]"
<option selected="selected" value="00">12 AM</option>
<option value="01">01 AM</option>
<option value="02">02 AM</option>
<option value="03">03 AM</option>
<option value="04">04 AM</option>
<option value="05">05 AM</option>
<option value="06">06 AM</option>
<option value="07">07 AM</option>
<option value="08">08 AM</option>
<option value="09">09 AM</option>
<option value="10">10 AM</option>
<option value="11">11 AM</option>
<option value="12">12 PM</option>
<option value="13">01 PM</option>
<option value="14">02 PM</option>
<option value="15">03 PM</option>
<option value="16">04 PM</option>
<option value="17">05 PM</option>
<option value="18">06 PM</option>
<option value="19">07 PM</option>
<option value="20">08 PM</option>
<option value="21">09 PM</option>
<option value="22">10 PM</option>
<option value="23">11 PM</option>

The above erb code generates 'class' attribute. 'disabled' attribute is
not being created.

Can you help


Do you mind doing 2 things:

  1. add a value to ‘disabled’

  2. remove it

its confusing that you have ’ disabled: “” ’ as it means that out of the options you dont want to disable any and you can achieve that by not added the ‘disabled’ attribute.