mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-01 12:38:30 +08:00
After repository deletion, the next selected repository is the first one. [SCI-1269]
This commit is contained in:
parent
419d638163
commit
afce3010ef
1 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@ class RepositoriesController < ApplicationController
|
||||||
flash[:success] = t('repositories.index.delete_flash',
|
flash[:success] = t('repositories.index.delete_flash',
|
||||||
name: @repository.name)
|
name: @repository.name)
|
||||||
@repository.destroy
|
@repository.destroy
|
||||||
redirect_to :back
|
redirect_to team_repositories_path
|
||||||
end
|
end
|
||||||
|
|
||||||
def rename_modal
|
def rename_modal
|
||||||
|
@ -53,7 +53,7 @@ class RepositoriesController < ApplicationController
|
||||||
flash[:success] = t('repositories.index.rename_flash',
|
flash[:success] = t('repositories.index.rename_flash',
|
||||||
old_name: old_name, new_name: @repository.name)
|
old_name: old_name, new_name: @repository.name)
|
||||||
render json: {
|
render json: {
|
||||||
url: team_repositories_path(@team, repository: @repository)
|
url: team_repositories_path(repository: @repository)
|
||||||
}, status: :ok
|
}, status: :ok
|
||||||
else
|
else
|
||||||
render json: @repository.errors, status: :unprocessable_entity
|
render json: @repository.errors, status: :unprocessable_entity
|
||||||
|
|
Loading…
Reference in a new issue