Closed caioertai closed 3 years ago
@jamiesonreinhard
I could have gone a bit harder on the query and actually returned to whole thing in just one query, without any (although simple right now) in-memory iteration. I thought it was going to over-complicate, tho, by a lot, something that we might change in the near future. This should be good enough for a loooong time.
If anything, the best piece of optimization we could have is a daily cache for the user info (I don't think we should be updating this data more than once a day anyway).
Closes #167
Initialization
Should be initialized with a quiz question active record relation. I'm leaving it loose so we can decide later (maybe in another object) what quiz questions are we using from the user.
About the test
I left it just as initialization check for now, since I was a bit undecided on the interface. I'll update it later.
Interface example: