You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Second example is a tipical one-to-many User <-> Pet(s) association. There are two variantes of this:
37
+
* fixed number of pets (always show the same amount of nested elements)
38
+
* variable number of pets ("add pet" button)
39
+
40
+
Bonus example: you can combine both example 1 and 2 in a single form and update the user, the address and a variable number of pets with a single form and a single call to `attributes = ....` on the controller!
41
+
36
42
37
43
#### One-to-Many Through (model1 belongs_to model2, model2 has_many model3, model1 has_many model3 through model2)
0 commit comments