From b8450671f2a2b3ae2bc0ffb7b773a560f44c2880 Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 19 Aug 2019 00:46:31 -0500 Subject: [PATCH] /mod_actions: fix N+1 query. --- app/controllers/mod_actions_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/mod_actions_controller.rb b/app/controllers/mod_actions_controller.rb index db302ab34..07dab53cb 100644 --- a/app/controllers/mod_actions_controller.rb +++ b/app/controllers/mod_actions_controller.rb @@ -2,7 +2,7 @@ class ModActionsController < ApplicationController respond_to :html, :xml, :json def index - @mod_actions = ModAction.search(search_params).paginate(params[:page], :limit => params[:limit]) + @mod_actions = ModAction.includes(:creator).search(search_params).paginate(params[:page], limit: params[:limit]) respond_with(@mod_actions) end