Skip to content

Commit 42c326a

Browse files
authored
Update README.md
1 parent 67d84e3 commit 42c326a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

+6
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@ First example is a tipical one-to-one User <-> Address association. Models confi
3333

3434
#### One-to-Many (model1 has_many model2, model2 belongs_to model1)
3535

36+
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+
3642

3743
#### One-to-Many Through (model1 belongs_to model2, model2 has_many model3, model1 has_many model3 through model2)
3844

0 commit comments

Comments
 (0)