From 2b450d0c49da229768467953bbdba9687fc40ee5 Mon Sep 17 00:00:00 2001 From: mo khan Date: Sun, 11 Jan 2015 09:39:08 -0700 Subject: add tests for searching cakes. --- app/controllers/api/v2/cakes_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/api') diff --git a/app/controllers/api/v2/cakes_controller.rb b/app/controllers/api/v2/cakes_controller.rb index ec38e753..4c85fd90 100644 --- a/app/controllers/api/v2/cakes_controller.rb +++ b/app/controllers/api/v2/cakes_controller.rb @@ -7,7 +7,7 @@ module Api end def index - @cakes = @repository.search_with(params).includes(:category).page(page).per(per_page) + @cakes = paginate(@repository.search_with(params).includes(:category)) end def show(id = params[:id]) -- cgit v1.2.3