fix slow pagination
This commit is contained in:
parent
bf7dc45fd0
commit
cc527b069c
|
@ -15,7 +15,7 @@ class Admin::FaqsController < OrbitAdminController
|
|||
categories = params[:filters][:category].blank? ? [] : params[:filters][:category] rescue []
|
||||
tags = params[:filters][:tags].blank? ? [] : params[:filters][:tags] rescue []
|
||||
|
||||
@qas = Kaminari.paginate_array(Qa.order_by(sort).with_categories(categories).with_tags(tags).with_status(status)).page(params[:page]).per(10)
|
||||
@qas = Qa.order_by(sort).with_categories(categories).with_tags(tags).with_status(status).page(params[:page]).per(10)
|
||||
|
||||
if request.xhr?
|
||||
render :partial => "index"
|
||||
|
|
Loading…
Reference in New Issue