rubyforgood / rubyforgood/awbw
Change Form to belong_to FormBuilder
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 15
- Forks
- 26
- Avg merge
- 12h 42m
- Merged PRs (30d)
- 242
Description
Right now it belongs to :owner, polymorphic: true, but there's no other item a Form belongs to.
Also, shouldn't it be that a FormBuilder belongs_to a Form???
And, maybe FormBuilder shouldn't even exist since it's 1:1 with Form. Or, it should inherit from Form. Maybe FormBuilder has enough unique behavior it makes sense to separate the concern, but, the data in the db indicates they are 1:1 and it's a lot of mental overhead to see them as separate -- and barely related -- objects.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by inspecting the Form and FormBuilder model definitions and the database relationship described in the issue. Compare the existing ownership and one-to-one behavior, then determine which model structure best fits the data and responsibilities. Done means the relationship and resulting model design are agreed on and consistently represented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- backend, databases
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100