summaryrefslogtreecommitdiff
path: root/lib/api/projects.rb
diff options
context:
space:
mode:
authorNihad Abbasov <narkoz.2008@gmail.com>2013-02-27 06:00:33 -0800
committerNihad Abbasov <narkoz.2008@gmail.com>2013-02-27 06:00:33 -0800
commit8d847b89d25951b57d843676bf9207f22c12597e (patch)
treea146a1c5e433d55d3d756e01c3a540760f0af6b8 /lib/api/projects.rb
parent135418dcbf72d264a846649b95ea8e6d8a2aadcf (diff)
downloadgitlab-ce-8d847b89d25951b57d843676bf9207f22c12597e.tar.gz
API: fix commits pagination
closes #2300
Diffstat (limited to 'lib/api/projects.rb')
-rw-r--r--lib/api/projects.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/api/projects.rb b/lib/api/projects.rb
index 631ed535459..10404b0d525 100644
--- a/lib/api/projects.rb
+++ b/lib/api/projects.rb
@@ -292,7 +292,7 @@ module Gitlab
authorize! :download_code, user_project
page = params[:page] || 0
- per_page = params[:per_page] || 20
+ per_page = params[:per_page].to_i || 20
ref = params[:ref_name] || user_project.try(:default_branch) || 'master'
commits = user_project.repository.commits(ref, nil, per_page, page * per_page)