0
我有2名助手:指定值options_for_select輔助
all_currencies(Money::Currency.table)
all_currencies_values(Money::Currency.table)
每個輔助與型動物值的數組:
助手1:
["ZWN, Zimbabwean Dollar, $", "ZWR, Zimbabwean Dollar, $"]
助手2:
["ZWN", "ZWR"]
我需要指定第二個選擇字段的值屬性中的助手。我曾嘗試與此:
<%= select_tag "currency", all_currencies_values(Money::Currency.table)), options_for_select(all_currencies(Money::Currency.table), :prompt => "Select currency" %>
但我得到兩個相同的結果,文本和選擇字段的值:
我怎樣才能添加輔助2 all_currencies_values(Money::Currency.table)
到選擇字段值和輔助1在選擇字段文本?
謝謝!
謝謝,你的修復工作正常。謝謝! – hyperrjas
@hyperrjas太棒了! :) – lurker