Actions
Bug #18875
openFix *_name methods to use cached association
Status:
New
Priority:
Normal
Assignee:
-
Category:
Performance
Target version:
-
Description
app/models/concerns/has_many_common.rb defines a *_name methods for each belongs_to association.
The problem is that this method in fact forces a query for each time the *_name method is accessed. This problem gets even worse if multiple hosts are queried (it becomes forced N+1), as in api hosts index action.
Actions