dimanche 28 février 2016

How to add multiple rows in a single table using single submit button in ruby on rails

I am new to ruby on rails and dont know much about it. I want to add attribute_id and attribute_value_id from table Attribute and AttirbuteValue to third table CustomerOrder (id, attribute_id, attribute_value_id). A user can have multiple combination of attribute_id and attribute_value_id. I am looping all values of Attribute and AttirbuteValue to a customerOrder from and want to save all checked values to CustomerOrder table. Thanks for your help in advance.

Aucun commentaire:

Enregistrer un commentaire