oddballteam / magnifier

1 stars 0 forks source link

Convert the Accomplishment#create... methods into find_or_create_by! methods #99

Closed hpjaj closed 5 years ago

hpjaj commented 5 years ago

Background

All of these methods should be converted into find_or_create_by! methods, to avoid potential failures when a user manually adds in a stat into their Week in Review.

For example, if a user removes an Accomplishment from their "issues created", still has it in their "issues worked" section. And then later wants to add it back to their "issues created" section. There would be a collision with the existing "issues worked" `Accomplishment during the create process, due to validations on that model.

Definition of Done

hpjaj commented 5 years ago

completed