Uses take rather than Kaminari

This commit is contained in:
Phil Hughes 2016-11-02 12:15:25 +00:00 committed by Jacob Schatz
parent af02f6ae9d
commit ba2089e017
1 changed files with 2 additions and 2 deletions

View File

@ -270,12 +270,12 @@ class ProjectsController < Projects::ApplicationController
branches = BranchesFinder.new(@repository, params).execute
options = {
'Branches' => Kaminari.paginate_array(branches).page(params[:page]).per(100),
'Branches' => branches.take(100),
}
unless @repository.tag_count.zero?
tags = TagsFinder.new(@repository, params).execute
options['Tags'] = Kaminari.paginate_array(tags).page(params[:page]).per(100)
options['Tags'] = tags.take(100)
end
# If reference is commit id - we should add it to branch/tag selectbox