项目名称唯一

This commit is contained in:
sw 2014-07-03 15:50:36 +08:00
parent 5abee0a06c
commit 740f6a19ec
1 changed files with 1 additions and 0 deletions

View File

@ -113,6 +113,7 @@ class Project < ActiveRecord::Base
validates_presence_of :name, :identifier
validates_uniqueness_of :identifier
validates_uniqueness_of :name
validates_associated :repository, :wiki
# validates_length_of :description, :maximum => 255
validates_length_of :name, :maximum => 255