Fix edit project page when repo does not exist

This commit is contained in:
Dmitriy Zaporozhets 2013-08-03 11:30:07 +03:00
parent d7f551bd3a
commit d0d10992bc

View file

@ -22,7 +22,7 @@
.input
= f.text_area :description, placeholder: "awesome project", class: "span5", rows: 3, maxlength: 250
- if @project.repository.branch_names.any?
- if @project.repository.exists? && @project.repository.branch_names.any?
.clearfix
= f.label :default_branch, "Default Branch"
.input= f.select(:default_branch, @repository.branch_names, {}, {class: 'chosen'})