rubyforgood / homeward-tails

Homeward Tails 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
69 stars 117 forks source link

Refactor CustomForm::SubmittedAnswer to FormAnswer #867

Closed kasugaijin closed 2 months ago

kasugaijin commented 4 months 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 4 months ago

Can I take this one?

kasugaijin commented 4 months ago

@Gabe-Torres all yours!

kasugaijin commented 4 months 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 3 months 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.

github-actions[bot] commented 2 months ago

Automatically unassigned after 7 days of inactivity.