diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-05-23 14:25:55 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-05-23 14:25:55 +0300 |
commit | 695fd3cf2c7e01d06e9c335cae208089a4c6bfbd (patch) | |
tree | da03740535eb2c9d05262f5c760bba4b1346e06a /app/controllers/projects/branches_controller.rb | |
parent | 8ae2d2152b197931725a3f4b9aa3697f37988c20 (diff) | |
download | gitlab-ce-695fd3cf2c7e01d06e9c335cae208089a4c6bfbd.tar.gz |
Move protected branches to Project settings
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/controllers/projects/branches_controller.rb')
-rw-r--r-- | app/controllers/projects/branches_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/projects/branches_controller.rb b/app/controllers/projects/branches_controller.rb index 00811f17adb..8c70ae45f06 100644 --- a/app/controllers/projects/branches_controller.rb +++ b/app/controllers/projects/branches_controller.rb @@ -7,7 +7,9 @@ class Projects::BranchesController < Projects::ApplicationController before_filter :authorize_push!, only: [:create, :destroy] def index - @branches = Kaminari.paginate_array(@repository.branches).page(params[:page]).per(30) + @sort = params[:sort] || 'name' + @branches = @repository.branches_sorted_by(@sort) + @branches = Kaminari.paginate_array(@branches).page(params[:page]).per(30) end def recent |