diff options
| author | mo khan <mo@mokhan.ca> | 2014-11-18 21:55:11 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-11-18 21:55:11 -0700 |
| commit | fd71b4bb7564215e0ddc2f40226398040c216bd3 (patch) | |
| tree | 6ebd1ab865978a9c4bcd12da368c52031c901485 /app/controllers/api | |
| parent | 846e51abe76a7c60f29c238b6b9efca3c1c21f0d (diff) | |
add pagination to the index action.
Diffstat (limited to 'app/controllers/api')
| -rw-r--r-- | app/controllers/api/v2/cakes_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/api/v2/cakes_controller.rb b/app/controllers/api/v2/cakes_controller.rb index 91129cf9..d85f1cb7 100644 --- a/app/controllers/api/v2/cakes_controller.rb +++ b/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]) |
