Commit f72ecaa

mo khan <mo@mokhan.ca>
2017-02-12 02:13:20
load 24 rows.
1 parent 5c67621
Changed files (2)
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