Commit f72ecaa
Changed files (2)
app
controllers
concerns
app/controllers/concerns/pageable.rb
@@ -10,7 +10,7 @@ module Pageable
(params[:per_page] || DEFAULT_PER_PAGE).to_i
end
- def paginate(items)
+ def paginate(items, per_page: per_page)
items.page(page).per(per_page)
end
end
app/controllers/workouts_controller.rb
@@ -1,6 +1,6 @@
class WorkoutsController < ApplicationController
def index
- @workouts = paginate(recent_workouts)
+ @workouts = paginate(recent_workouts, per_page: 24)
end
def new