Clean up points queries

Open
#100 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Refactor
Clarity
Needs clarification
Activity status
Stale
Tech stack
ruby
Domain
backend, databases

Research direction

Start by reading the query code in AwardedPoint, AvailablePoint, and User, then inspect the existing tests for those models. Map the redundant queries and identify the reported N+1 cases before deciding whether a helper class is warranted. Done means the queries are simpler, comments explain the non-obvious parts, N+1 behavior is reduced, and tests cover the revised behavior.

Written by the indexing model from the issue text.

Description

enhancement tricky

There are a bunch of complex queries in AwardedPoint, AvailablePoint and User. with some redundancy. Clean it up, add comments, maybe refactor them to some helper class. Reduce N+1 problems. Also improve tests.

Dominant language
Ruby
Stars
51
Forks
42
Avg merge
1h 27m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from testmycode/tmc-server

All issues in testmycode/tmc-server

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.