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

idea: a way to adopt all child records to #17

Open
hstoebel opened this issue Jun 26, 2017 · 0 comments
Open

idea: a way to adopt all child records to #17

hstoebel opened this issue Jun 26, 2017 · 0 comments

Comments

@hstoebel
Copy link
Owner

lets say there is an orphan model called Exam and each Exam has many ExamSections. If there is an orphan ExamTemp it should be able to have_many ExamSectionTemps and there adoption should be handled automatically by calling adopt on the parent.

Currently this is possible to do manually, buy setting the association with the child record, and setting up a transaction to handle all of the adoptions. I'm thinking about streamlining it a bit more. This would mean

  • calling Orphanage:Init has an option to specify a child association
  • calling adopt automatically tries to bring in children as well
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant