1
在我的應用程序破壞我有表格嵌套模型字段,它看起來像這樣:嵌套模型添加和通過JavaScript
= simple_form_for [:partners, @car], url: wizard_path do |f|
= f.association :payment_types, as: :check_boxes
= f.simple_fields_for :prices do |p|
= p.input :from_days
= p.input :to_days
= p.input :netto_price
= p.input :available_from, as: :string
= p.input :available_to, as: :string
= f.submit
現在我想有按鈕「添加新的」,當我點擊它,它將通過javascript字段呈現新價格。我該怎麼做?
https://github.com/nathanvda/cocoon – sevenseacat