summaryrefslogtreecommitdiff
path: root/app/controllers/projects/branches_controller.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-05-23 14:25:55 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-05-23 14:25:55 +0300
commit695fd3cf2c7e01d06e9c335cae208089a4c6bfbd (patch)
treeda03740535eb2c9d05262f5c760bba4b1346e06a /app/controllers/projects/branches_controller.rb
parent8ae2d2152b197931725a3f4b9aa3697f37988c20 (diff)
downloadgitlab-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.rb4
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