Browse files

Merge pull request #3407 from NARKOZ/patch-1

use convenient method to check for empty project repo
  • Loading branch information...
2 parents e3f1164 + 7ed0dc0 commit a31fe1a63f03c674338f95bf91e53198c2b526f5 @randx randx committed Mar 26, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 app/controllers/projects_controller.rb
View
6 app/controllers/projects_controller.rb
@@ -57,11 +57,11 @@ def show
respond_to do |format|
format.html do
- if @project.repository && !@project.repository.empty?
+ if @project.empty_repo?
+ render "projects/empty"
+ else
@last_push = current_user.recent_push(@project.id)
render :show
- else
- render "projects/empty"
end
end
format.js

0 comments on commit a31fe1a

Please sign in to comment.