ryanb/nested_form — Issue #144: Possibility to add fields_for from jQuery
Author: redr0bin
Created: 2012-02-29 15:01:18+00:00
State: open

Hi,
is there a way to dynamically populate fields_for ?

The use case in my situation is: models Project,Product,ProductSet and Resource. I have populated ProductSet-s with Product-s and quantities.
I have a Project model which accepts_nested_attributes_for Resource-s. One of the Project form fields is f.select :product_set_id, when it is changed I must fire some method to populate Resources from Product set.
Can not understand what to do

Thanks in advance.