RailsAdmin - preventing N+1 queries via includes
Asked Answered
P

0

7

Does anyone know of a way to configure that? Or another DB query optimization technique?

I am using Rails 4.1.8 with RailsAdmin 0.6.8 and Mongoid 4.0.2

Predicament answered 8/10, 2015 at 18:23 Comment(3)
can you elaborate your question please?Gennie
Let's say I have customers and orders. I want to view the order list but I want to display customer name next to each order. RailsAdmin will query for each customer individually by customer_id (N+1 queries are slow). If I were building this using regular controllers/views, I would simply put includes(:customers) in my orders index controller. How do I do that in RailsAdmin?Predicament
github.com/sferik/rails_admin/issues/2427 Looks like this is an issue that hasn't been resolved yet.Thorny

© 2022 - 2024 — McMap. All rights reserved.