0
在簡單的形式我有幾個單選按鈕。單選按鈕的標籤,我想跨度CSS添加到標籤的一部分,所以它看起來是這樣的:在simple_form部分CSS爲label_method
30 days <strong>for only 30 bucks </strong>
我的輸入是這樣的:
<%= f.input :duration, :label => "Duration: ",
:collection => Payment::OPTIONS,
:label_method => lambda { |a| a.first.to_s + " days for only" + a.last.to_s + " $ " } ,
:value_method => lambda { |a| a.first.to_s + "-" + a.last.to_s } ,
:as => :radio %>
是它可以將CSS加起來也只有部分"for only" + a.last.to_s + " $ "
有什麼不好的跨度,就像你說的? – Ven
它顯示的HTML和沒有解釋的HTML。下面回答固定它! – Ayrad