keygen-sh / keygen-api

Keygen is a fair source software licensing and distribution API built with Ruby on Rails. For developers, by developers.
https://keygen.sh
Other
700 stars 40 forks source link

Fix N+1 on users index when users are not new (Bullet) #792

Closed ezekg closed 4 months ago

ezekg commented 4 months ago

Supersedes #791. Switching from Bullet to Prosopite gave too many positives for cases that are out of our control, e.g. when creating multiple resources using association IDs. I was able to force the failure with Bullet by upgrading Bullet (duh).

Resolves an N+1 issue caused by User#status for the users index when the collection contained old users.