summaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-27 17:34:58 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-27 17:34:58 +0000
commit9d372ce6f5b1b6a5861e9f3c212ea805af9d2d37 (patch)
tree560a0ccea739195056c6722a263dcf32983003c1 /app/models
parentffbd3c0522a0b5259976586999fd3a9ff963eb6d (diff)
downloadredmine-9d372ce6f5b1b6a5861e9f3c212ea805af9d2d37.tar.gz
redmine-9d372ce6f5b1b6a5861e9f3c212ea805af9d2d37.zip
Allow underscores in project identifiers (#1363).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8708 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r--app/models/project.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index 878b4c0ca..8a79ed674 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -76,7 +76,7 @@ class Project < ActiveRecord::Base
validates_length_of :homepage, :maximum => 255
validates_length_of :identifier, :in => 1..IDENTIFIER_MAX_LENGTH
# donwcase letters, digits, dashes but not digits only
- validates_format_of :identifier, :with => /^(?!\d+$)[a-z0-9\-]*$/, :if => Proc.new { |p| p.identifier_changed? }
+ validates_format_of :identifier, :with => /^(?!\d+$)[a-z0-9\-_]*$/, :if => Proc.new { |p| p.identifier_changed? }
# reserved words
validates_exclusion_of :identifier, :in => %w( new )