From ed8f9978b6d7c3583b6cffabe9dcae3d0192f98a Mon Sep 17 00:00:00 2001 From: phyusin Date: Wed, 23 May 2018 17:55:17 +0630 Subject: [PATCH] remove paginate in surveys --- app/controllers/transactions/surveys_controller.rb | 10 ++-------- app/views/transactions/surveys/index.html.erb | 3 --- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/app/controllers/transactions/surveys_controller.rb b/app/controllers/transactions/surveys_controller.rb index 4bf4ec2d..829e7252 100644 --- a/app/controllers/transactions/surveys_controller.rb +++ b/app/controllers/transactions/surveys_controller.rb @@ -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 diff --git a/app/views/transactions/surveys/index.html.erb b/app/views/transactions/surveys/index.html.erb index cb95ad16..a57d724f 100644 --- a/app/views/transactions/surveys/index.html.erb +++ b/app/views/transactions/surveys/index.html.erb @@ -93,9 +93,6 @@
- <%if !@orders.nil?%> - <%= paginate @surveys %> - <%end%>