fix slow pagination

This commit is contained in:
manson 2014-05-21 15:56:53 +08:00
parent 9c98bca6dd
commit 995efe428b
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ class Admin::ArchiveFilesController < OrbitAdminController
categories = params[:filters][:category].blank? ? [] : params[:filters][:category] rescue []
tags = params[:filters][:tags].blank? ? [] : params[:filters][:tags] rescue []
@archives = Kaminari.paginate_array(ArchiveFile.order_by(sort).with_categories(categories).with_tags(tags).with_status(status)).page(params[:page]).per(10)
@archives = ArchiveFile.order_by(sort).with_categories(categories).with_tags(tags).with_status(status).page(params[:page]).per(10)
if request.xhr?
render :partial => "index"