fix pagination

This commit is contained in:
Alexander Machehin 2012-12-04 17:12:51 +06:00
parent bd25c4aa3d
commit 0a88010a83
1 changed files with 1 additions and 1 deletions

View File

@ -77,7 +77,7 @@ class Api::V1::BaseController < ApplicationController
per_page = 20 if per_page < 1
per_page = 100 if per_page >100
page = params[:page].to_i
page = 1 if page == 0
page = nil if page == 0
{:page => page, :per_page => per_page}
end