修改删除主版本库后,新建可以设置主版本库

This commit is contained in:
huang 2015-07-24 15:02:01 +08:00
parent 518ce15df5
commit 390aa632cd
1 changed files with 5 additions and 4 deletions

View File

@ -236,13 +236,14 @@ module RepositoriesHelper
# 判断项目是否有主版本库
def judge_main_repository(pro)
if pro.repositories.blank?
return false
status = false
else
pro.repositories.sort.each do |rep|
rep.is_default?
return true
pro.repositories.each do |rep|
status = true and break if rep.is_default?
status = false
end
end
status
end
# def cvs_field_tags(form, repository)
# content_tag('p', form.text_field(