Skip to content

Commit

Permalink
Add Paginator module to BetsController
Browse files Browse the repository at this point in the history
  • Loading branch information
LeonTenko committed Apr 5, 2017
1 parent 5a5299c commit 88ba3d2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/controllers/bets_controller.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
class BetsController < ApplicationController
include Utilities::Paginator
helper Utilities::Paginator

def index
@bets = Bet.includes(:user_bets)
@bets = items_to_display(model: Bet,
items_per_page: 25,
current_page: params[:page].to_i)
end

def show
Expand Down

0 comments on commit 88ba3d2

Please sign in to comment.