From acea5067e3a8dbcd68ed7890461b76b081cdab57 Mon Sep 17 00:00:00 2001 From: YarekTenko Date: Mon, 27 Mar 2017 10:21:08 -0700 Subject: [PATCH] Add Paginator module to BetsController --- app/controllers/bets_controller.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/controllers/bets_controller.rb b/app/controllers/bets_controller.rb index 4211b51..90eaecb 100644 --- a/app/controllers/bets_controller.rb +++ b/app/controllers/bets_controller.rb @@ -1,6 +1,11 @@ class BetsController < ApplicationController + include Utilities::Paginator + helper Utilities::Paginator + def index - @bets = Bet.all + @bets = items_to_display(model: Bet, + items_per_page: 25, + current_page: params[:page]) end def show