2
我有了形式:提示=>許多輸入「選擇」:使用with_options與Rails形成幫手
f.select :country, :prompt => "Select"
f.select :city, :prompt => "Select"
...
有沒有辦法來包裝這個使用with_options和幹起來?
我有了形式:提示=>許多輸入「選擇」:使用with_options與Rails形成幫手
f.select :country, :prompt => "Select"
f.select :city, :prompt => "Select"
...
有沒有辦法來包裝這個使用with_options和幹起來?
這應該工作:)
f.with_options :prompt => "Select" do |form| form.select :country form.select :city end
容易餡餅!多謝,夥計! – Gavin 2009-09-17 11:01:56