From afce3010ef928270641dcb16a6cf7fe56dc7793c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Zrim=C5=A1ek?= Date: Mon, 5 Jun 2017 17:56:09 +0200 Subject: [PATCH] After repository deletion, the next selected repository is the first one. [SCI-1269] --- app/controllers/repositories_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 89f388626..ec4ec8293 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -26,7 +26,7 @@ class RepositoriesController < ApplicationController flash[:success] = t('repositories.index.delete_flash', name: @repository.name) @repository.destroy - redirect_to :back + redirect_to team_repositories_path end def rename_modal @@ -53,7 +53,7 @@ class RepositoriesController < ApplicationController flash[:success] = t('repositories.index.rename_flash', old_name: old_name, new_name: @repository.name) render json: { - url: team_repositories_path(@team, repository: @repository) + url: team_repositories_path(repository: @repository) }, status: :ok else render json: @repository.errors, status: :unprocessable_entity