Open omarsotillo opened 4 years ago
Hmm. First of all thank you for the question.
I believe the issue still exists and it's related to association between persisted model and not persisted yet model. In your examples all the models are persisted that's why it works well.
Actually the documentation isn't accurate and there is no new
method for has_many
association so the example user.addresses.new
doesn't work. There is a method <<
which adds a model to an association but it looks like it cannot add a not-persisted model.
Let's sum up. The mentioned issue exists and warning in documentation still actual but the documentation is not accurate.
Hi! 👋
On the documentation it states the following:
👨💻 On the code, I decided to give it a try and it seems to work. E.g:
Model: