diff options
Diffstat (limited to 'app/controllers/projects/branches_controller.rb')
-rw-r--r-- | app/controllers/projects/branches_controller.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/controllers/projects/branches_controller.rb b/app/controllers/projects/branches_controller.rb index a753d5705aa..6f3c96fa654 100644 --- a/app/controllers/projects/branches_controller.rb +++ b/app/controllers/projects/branches_controller.rb @@ -177,10 +177,8 @@ class Projects::BranchesController < Projects::ApplicationController def fetch_branches_by_mode return fetch_branches_for_overview if @mode == 'overview' - # active/stale/all view mode - @branches = BranchesFinder.new(@repository, params.merge(sort: @sort)).execute - @branches = @branches.select { |b| b.state.to_s == @mode } if %w[active stale].include?(@mode) - @branches = Kaminari.paginate_array(@branches).page(params[:page]) + @branches, @prev_path, @next_path = + Projects::BranchesByModeService.new(@project, params.merge(sort: @sort, mode: @mode)).execute end def fetch_branches_for_overview |