mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-01 04:32:16 +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',
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue