From 70dc5e2b49ad81d47ab586c3e9409d26d4ed9479 Mon Sep 17 00:00:00 2001 From: nwb Date: Wed, 2 Jul 2014 15:10:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8E=BB=E9=99=A4=E4=B8=BB=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E5=BA=93=E6=A0=87=E8=AF=86=E5=85=81=E8=AE=B8=E4=B8=BA=E7=A9=BA?= =?UTF-8?q?=E7=9A=84=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/repository.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/repository.rb b/app/models/repository.rb index bcd3366cb..ce7ac9d0c 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -38,7 +38,7 @@ class Repository < ActiveRecord::Base validates_length_of :password, :maximum => 255, :allow_nil => true validates_length_of :identifier, :maximum => IDENTIFIER_MAX_LENGTH, :allow_blank => true - validates_presence_of :identifier, :unless => Proc.new { |r| r.is_default? || r.set_as_default? } + validates_presence_of :identifier#, :unless => Proc.new { |r| r.is_default? || r.set_as_default? } validates_uniqueness_of :identifier, :scope => :project_id, :allow_blank => true validates_exclusion_of :identifier, :in => %w(show entry raw changes annotate diff show stats graph) # donwcase letters, digits, dashes, underscores but not digits only