mirror of
https://github.com/System-End/hackatime.git
synced 2026-04-20 00:35:22 +00:00
put users on the main page if no more archived projects (#772)
This commit is contained in:
parent
6a6854f2db
commit
ffcb6e6a00
1 changed files with 3 additions and 1 deletions
|
|
@ -34,7 +34,9 @@ class My::ProjectRepoMappingsController < ApplicationController
|
|||
|
||||
def unarchive
|
||||
@project_repo_mapping.unarchive!
|
||||
redirect_to my_projects_path(show_archived: true), notice: "Back from the dead!"
|
||||
r = current_user.project_repo_mappings.archived.where.not(id: @project_repo_mapping.id).exists?
|
||||
p = r ? my_projects_path(show_archived: true) : my_projects_path
|
||||
redirect_to p, notice: "Back from the dead!"
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue