ruby on rails - RoR - Select tag with include_blank disable -


i want result :

<select dir="rtl">   <option selected disabled>choose car</option>   <option value="volvo">volvo</option>   <option value="saab">saab</option>   <option value="mercedes">mercedes</option>   <option value="audi">audi</option> </select> 

with following code can end :

<%= f.select(:car, xxxxxx, {:include_blank => 'choose car', :disabled => 'choose car'}) %> 

=>

<select id="xxx" name="xxx">   <option value="">choose car</option>   <option value="volvo">volvo</option>   <option value="saab">saab</option>   <option value="mercedes">mercedes</option>   <option value="audi">audi</option> </select> 

the first option not disabled...

i believe looking below:

<%= f.select(:car, xxxxxx, {:include_blank => 'choose car', :disabled => 1}) %> 

Comments

Popular posts from this blog

javascript - How to diff two immutable objects -

javascript - React.js: onClick function from child to parent -

c# - How can I have the VS Debugger break in the correct location for exceptions thrown in Async methods in a Console App? -