0
是否可以使用Ajax並將結果作爲選擇列表與Formtastic?將ajax結果作爲選擇列表與formtastic
例如:
semantic_form_for @user, :url => profile_path(@profile.id) do |f|
- f.inputs do
- f.input :province, :label => "Province", :as => :select, :collection => ["province-1", "province-2", "province-3"]
- f.input :city, :label => "City", :as => :select
- f.buttons do
= f.submit "Submit"
我想要動態地根據全省城市的選擇列表中的變化。