<%= f.collection_radio_buttons :address_id, @addresses.map {|a| [a.id, a.name]}, :first, :last, {:item_wrapper_tag => :div, :item_wrapper_class => "option_box", :wrapper => false} %>
生成
<div class="option_box">
<input checked="checked" id="order_address_id_9" name="order[address_id]" type="radio" value="9" >
<label class="collection_radio_buttons" for="order_address_id_9">张三丰, 21313212312, 宁夏回族自治区 银川市 市辖区 啥, 213123
</label>
</div>
我现在想在 input 里面加一个额外的参数,这个参数每个选项都不同:
<input checked="checked" id="order_address_id_9" name="order[address_id]" type="radio" value="9" **class="address_9"** />
<input checked="checked" id="order_address_id_10" name="order[address_id]" type="radio" value="9" **class="address_10"** />
该这么写?