I want to write this code
<select name="date[birth]" id="date_birth" class = "span1">
<option value="2011">2011</option>
<option value="2012" selected="selected">2012</option>
<option value="2013">2013</option>
</select>
in Rails, it has the select_year helper, I just write
= select_year(Date.today, :field_name => "birth", :start_year => 2011, :end_year => 2013)
I try to add css class to this by the attribute :class => "span1", but it doesn’t work!
Please help me, thanks
1 Answer