Refactor achievements app to leverage uniqBy
What does this MR do and why?
Minor code refactor to address a follow up
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- Enable
achievements
feature flag - Visit http://gdk.test:3000/groups/flightjs/-/achievements/
- Hopefully your database is already seeded with achievements (otherwise create a few) and award them to a few users (easiest via the rails console
FactoryBot.create(:user_achievement, achievement: Achievements::Achievement.find(x), user: User.find(y))
) - Ensure one achievements is awarded to the same user multiple times (use the rails console
FactoryBot.create(:user_achievement, achievement: Achievements::Achievement.find(x), user: User.find(y))
) - Visit http://gdk.test:3000/groups/flightjs/-/achievements/ and ensure only the unique list of recipients is displayyed against each achievement
Related to #452365 (closed)
Edited by Lee Tickett