From 0eb8ac70873e498a779717a273de1d44cbcdfff5 Mon Sep 17 00:00:00 2001 From: Yan Date: Wed, 14 Jun 2017 19:54:11 +0630 Subject: [PATCH] fixing pagination --- Gemfile | 3 ++- Gemfile.lock | 3 +-- app/controllers/transactions/orders_controller.rb | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 7774eba1..4de32f60 100644 --- a/Gemfile +++ b/Gemfile @@ -61,7 +61,8 @@ gem 'sidekiq' #gem 'nokogiri', '~> 1.6' # Pagination -gem 'kaminari', '~> 0.16.3' +gem 'kaminari' +# gem 'kaminari', :git => "git://github.com/amatsuda/kaminari.git", :branch => 'master' # Datatable gem 'filterrific' diff --git a/Gemfile.lock b/Gemfile.lock index e96c8ee0..3a3721d9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -247,10 +247,9 @@ DEPENDENCIES jbuilder (~> 2.5) jquery-rails jquery-ui-rails - kaminari (~> 0.16.3) + kaminari listen (~> 3.0.5) mysql2 (>= 0.3.18, < 0.5) - nokogiri (~> 1.6) pg prawn prawn-table diff --git a/app/controllers/transactions/orders_controller.rb b/app/controllers/transactions/orders_controller.rb index 35cefe6f..2d3a819e 100644 --- a/app/controllers/transactions/orders_controller.rb +++ b/app/controllers/transactions/orders_controller.rb @@ -13,7 +13,7 @@ class Transactions::OrdersController < ApplicationController end end - @orders = Kaminari.paginate_array(orders).page(params[:page]).per(50) + @orders = Kaminari.paginate_array(orders).page(params[:page]).per(2) respond_to do |format| format.html # index.html.erb format.json { render json: @orders }