From 7ed0dc0185e93a0af9bf67888c5b24a49baf48a3 Mon Sep 17 00:00:00 2001 From: Nihad Abbasov Date: Tue, 26 Mar 2013 07:14:57 -0700 Subject: [PATCH] use convenient method to check for empty project repo --- app/controllers/projects_controller.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index 5b17e1ab..8e55aa01 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -57,11 +57,11 @@ class ProjectsController < ProjectResourceController 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