Closed kasugaijin closed 1 month ago
I'll take this one!
@Gabe-Torres all yours
Hey @kasugaijin!
I ran into a couple of issues when creating the form_submission
model. I know there are some incoming big changes to the codebase, so maybe these will be resolved within the next couple of weeks.
I successfully created the form_submission
model and test. In the process of updating the adopter_applications
model test to account for the changes, I made an associations context block. I also had to create a quick factory so form_submission
can be referenced within the test. After a couple of tweaks, the form_submission
, adopter_applications
, and submitted_answers
model tests are all passing. However, the database will no longer seed properly. My guess is that the seeds need to be updated accordingly to account for the new changes. There are also quite a few errors after running the test suites.
I wanted to make sure I am heading in the right direction with this issue/PR.
Should I update the seeds and errors where needed? Was there no associations block within adopter_applicaitons
yet for this reason?
Is creating a factory for form_submission
and implementing it within adopter_applications
something you wanted done in this PR? Or should I just create the new form_submission
model and leave the other changes for a different issue ticket?
Thank you!
@Gabe-Torres i should have time to get a proper look in tomorrow! But yes it’s pretty common to need to update the seed data if an association has changed that the seeds rely upon.
Ah okay that does make sense! Thank you. Apologies for the 20 questions too 😂
This is a model that binds a set of submitted answers together from a form with a Person. Create the model and form_submissions table with person_id and organization_id foreign keys.
Model associations:
Please add model tests.