Prevention of N + 1 Requests

Learn how to prevent the application from generating N+1 queries.

We'll cover the following

Include user

Imagine that we want to add the owners of the products for the path /products. We have already seen that it is straightforward to do this with the fast_jsonapi library. We will modify the code in app/controllers/api/v1/products_controller.rb:

Get hands-on with 1400+ tech skills courses.