Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update has_many-associations.md #1629

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

mzagaja
Copy link

@mzagaja mzagaja commented Mar 21, 2024

I struggled to figure out how to make the has_many association work with the build strategy in a simple way. I asked ChatGPT and it came up with this strategy, which I tested and worked on an app last night. I also looked in my past code and realized years ago I figured this out previously in other apps I have written. I imagine its a common pattern.

It would be handy to be able to look up this code snippet for me in the repetitive but not common case I need to do this. I find it easier to reason about than the other examples in the documentation, it works well, and can save the need to persist to the database. I also would prefer to be able to look this up in official documentation and not an AI assistant.

I struggled to figure out how to make the has_many association work with the build strategy in a simple way. I asked ChatGPT and it came up with this strategy, which I tested and worked on an app last night. I also looked in my past code and realized years ago I figured this out previously in other apps I have written. I imagine its a common pattern.

It would be handy to be able to look up this code snippet for me in the repetitive but not common case I need to do this. I find it easier to reason about than the other examples in the documentation, it works well, and can save the need to persist to the database. I also would prefer to be able to look this up in official documentation and not an AI assistant.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants