/mod_actions: fix N+1 query.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user