remove paginate in surveys

This commit is contained in:
phyusin
2018-05-23 17:55:17 +06:30
parent 3a93830c94
commit ed8f9978b6
2 changed files with 2 additions and 11 deletions

View File

@@ -5,16 +5,10 @@ class Transactions::SurveysController < ApplicationController
to = params[:to]
if filter.nil? && from.nil? && to.nil?
surveys = Survey.all
@surveys = Survey.all
else
surveys = Survey.search(filter,from,to)
@surveys = Survey.search(filter,from,to)
end
if !surveys.nil?
@surveys = Kaminari.paginate_array(surveys).page(params[:page]).per(20)
else
@surveys = []
end
@filter = filter
@from = from