fix slow backend index page

This commit is contained in:
manson 2014-08-20 11:47:33 +08:00
parent 93337c1019
commit 8aa5a4f7d6
1 changed files with 2 additions and 1 deletions

View File

@ -361,7 +361,8 @@ class ApplicationController < ActionController::Base
end end
if pagination if pagination
Kaminari.paginate_array(filter_authorized_objects(objects)).page(params[:page]).per(10) # Kaminari.paginate_array(filter_authorized_objects(objects)).page(params[:page]).per(10)
filter_authorized_objects(objects).page(params[:page]).per(10)
else else
filter_authorized_objects(objects) filter_authorized_objects(objects)
end end