Commit fd71b4bb

mo khan <mo@mokhan.ca>
2014-11-19 04:55:11
add pagination to the index action.
1 parent 846e51a
Changed files (1)
app
controllers
app/controllers/api/v2/cakes_controller.rb
@@ -2,7 +2,7 @@ module Api
   module V2
     class CakesController < ApplicationController
       def index
-        @cakes = Creation.all
+        @cakes = Creation.page(page).per(per_page)
       end
 
       def show(id = params[:id])