rubyforgood / pet-rescue

Pet Rescue is an application making it easy to link adopters/fosters with pets. We work with grassroots pet rescue organizations to understand how we can make the most impact.
MIT License
57 stars 95 forks source link

Refactor CustomForm::SubmittedAnswer to FormAnswer #867

Open kasugaijin opened 1 month ago

kasugaijin commented 1 month ago

You can start this but one of the associations cannot be made until this PR is merged (which is close) https://github.com/rubyforgood/pet-rescue/pull/856/files

After some small architectural decisions requiring changes, we need the SubmittedAnswer model to be removed from the CustomForm scope and renamed to FormAnswer. We also need the submitted_answers table to be named form_answers. Also, please update all references to the class name and methods throughout the code. Basically a find and replace exercise for part of this work.

We should also update the associations on the model:

Gabe-Torres commented 1 month ago

Can I take this one?

kasugaijin commented 1 month ago

@Gabe-Torres all yours!

kasugaijin commented 1 month ago

@Gabe-Torres quick update - I think we should stick to using acts_as_tenant(:organization) here (like we do on all other records) instead of making a belongs_to org through submission.

github-actions[bot] commented 1 week ago

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.