我想写这段代码
<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>
在 Rails 中,它有 select_year 助手,我只是写
= select_year(Date.today, :field_name => "birth", :start_year => 2011, :end_year => 2013)
我尝试通过属性向它添加 css 类:class => "span1"
,但它不起作用!请帮助我,谢谢