diff --git a/CHANGELOG b/CHANGELOG index 56ab89abaf975c366e6b83905500cfea61b22b93..196a3d49911af40ab80921705faeba8a4aa49afb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -24,6 +24,7 @@ v 8.11.0 (unreleased) - Add "No one can push" as an option for protected branches. !5081 - Improve performance of AutolinkFilter#text_parse by using XPath - Add experimental Redis Sentinel support !1877 + - Fix branches page dropdown sort initial state (ClemMakesApps) - Environments have an url to link to - Update `timeago` plugin to use multiple string/locale settings - Remove unused images (ClemMakesApps) diff --git a/app/controllers/projects/branches_controller.rb b/app/controllers/projects/branches_controller.rb index e926043f3ebadbcf21721efa2430daa852f23409..48fe81b0d7456b66f0e200447dea7fa9f34ed0b3 100644 --- a/app/controllers/projects/branches_controller.rb +++ b/app/controllers/projects/branches_controller.rb @@ -1,12 +1,13 @@ class Projects::BranchesController < Projects::ApplicationController include ActionView::Helpers::SanitizeHelper + include SortingHelper # Authorize before_action :require_non_empty_project before_action :authorize_download_code! before_action :authorize_push_code!, only: [:new, :create, :destroy] def index - @sort = params[:sort].presence || 'name' + @sort = params[:sort].presence || sort_value_name @branches = BranchesFinder.new(@repository, params).execute @branches = Kaminari.paginate_array(@branches).page(params[:page])