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
|
@ -50,7 +50,7 @@ class ProjectsController < ApplicationController
|
|||
|
||||
respond_to do |format|
|
||||
format.html do
|
||||
if @project.repo_exists? && @project.has_commits?
|
||||
unless @project.empty_repo?
|
||||
@last_push = current_user.recent_push(@project.id)
|
||||
render :show
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue