Add "empty_repo?" method to Repository role
Replaces two calls that this method simplifies
This commit is contained in:
parent
7e76610d0a
commit
a463353773
4 changed files with 32 additions and 6 deletions
|
@ -135,7 +135,7 @@ class ApplicationController < ActionController::Base
|
|||
end
|
||||
|
||||
def require_non_empty_project
|
||||
redirect_to @project unless @project.repo_exists? && @project.has_commits?
|
||||
redirect_to @project if @project.empty_repo?
|
||||
end
|
||||
|
||||
def no_cache_headers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue