dmbf29 / predictor-api

match prediction app / back-end API built on Rails
1 stars 4 forks source link

Fix `matches#index` to serve all matches #56

Closed trouni closed 3 years ago

trouni commented 3 years ago

Found some issues with the query, but I don't think it's possible to solve with AR. Right now, matches for which you had made a prediction didn't show up for me.

I will need to make an advanced query in the future to get rid of the N+1 queries. For now, the iteration is happening when building the json.