<select id="machine_name" name="machine[name]">
<option class ="something" value="12">AZ01</option>
<option class ="something" value="13">AZ02</option>
<option class ="something" value="14">AZ03</option>
You can swap the order of the name and id fields in the array to get the
right values and inner content in the option elements, but I don't think
there's a convenient way to specify the CSS class of the option
elements.
You can either build the elements yourself (maybe with content_tag) or
add them using Javascript. It should be pretty easy to do with the
Prototype library (which is included in Rails by default). Try using
$$('select.something') to get the select element with the class
"something", then addClassName("something") on each option child
element.