has many through - Using fields from an association (has_many) model with formtastic in rails -
I searched and tried a lot, but I can not complete it as much as I want .. so this is my problem is.
class is running
moving resources
, like quantity
. We are working on the ideas of 'Bill', thanks to the formatticistic for making the entire relationship easier.
<%> form.input: workers, as = & gt; : Check-box %% & gt;
And I get a real checkbox list. But what I have not yet found: How can I use the additional fields from each of the 'desired resources' to checkboxes of the desired fields from that model?
I saw different approaches, mainly by looping through an array of objects and creating appropriate forms, using: form.inputs, or not in those parts, but those solutions None of the following was done (for example, editing was done for the scene but not for the new because the necessary items were not created or produced and were created due to the creation of them Had happened).
I want to know your solution for this!
OK, I accept that the sanctions have not been revolutionized, it tells us that Why is not working in
This has led me a big step, but I think there may be some complications with my complex relationships ^ _ ^
class moving & lt; ActiveRecord :: Base has has_many: movingworkers ,: depend => : Has_many is destroyed: workers, through = & gt; : Accepting for moving executives_all_common: End of walking end <% form.inputs: for = & gt; : People who walk. & Gt%; & Lt;% = movingworker.inputs: worker ,: volume% & gt; & Lt;% end% & gt;
Comments
Post a Comment