prevent exception when trying to edit empty project

master
Dmitriy Zaporozhets 2013-03-30 16:46:56 +02:00
parent 11b89eb381
commit 52ae054447
1 changed files with 2 additions and 2 deletions

View File

@ -36,10 +36,10 @@
.input
= f.text_area :description, placeholder: "awesome project", class: "span5", rows: 3, maxlength: 250
- unless @repository.heads.empty?
- unless @project.empty_repo?
.clearfix
= f.label :default_branch, "Default Branch"
.input= f.select(:default_branch, @repository.heads.map(&:name), {}, style: "width:210px;")
.input= f.select(:default_branch, @repository.branch_names, {})
- if can?(current_user, :change_public_mode, @project)