diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-06-19 19:12:17 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-06-19 19:12:17 +0000 |
commit | 3b854bee59211a8a1889f3630c5316a71d182c70 (patch) | |
tree | 4dd39345641b5be6ccc81b6c7a377b774b92b84e /app/models/repository.rb | |
parent | 6c6aae07a2371871aaa7f56721101e691804eaa5 (diff) | |
download | redmine-3b854bee59211a8a1889f3630c5316a71d182c70.tar.gz redmine-3b854bee59211a8a1889f3630c5316a71d182c70.zip |
Make repository identifier accept underscores (#11192).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9875 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/repository.rb')
-rw-r--r-- | app/models/repository.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/repository.rb b/app/models/repository.rb index 1f8820868..873c22313 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -37,8 +37,8 @@ class Repository < ActiveRecord::Base 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 but not digits only - validates_format_of :identifier, :with => /^(?!\d+$)[a-z0-9\-]*$/, :allow_blank => true + # donwcase letters, digits, dashes, underscores but not digits only + validates_format_of :identifier, :with => /^(?!\d+$)[a-z0-9\-_]*$/, :allow_blank => true # Checks if the SCM is enabled when creating a repository validate :repo_create_validation, :on => :create |