redmine-project-underscore-id-patch.diff

Greg Thornton, 05/13/2010 09:28 pm

Download (659 Bytes)

 
new/app/models/project.rb 2010-05-13 06:53:06.000000000 +0000
70 70
  validates_length_of :homepage, :maximum => 255
71 71
  validates_length_of :identifier, :in => 1..20
72 72
  # donwcase letters, digits, dashes but not digits only
73
  validates_format_of :identifier, :with => /^(?!\d+$)[a-z0-9\-]*$/, :if => Proc.new { |p| p.identifier_changed? }
73
  validates_format_of :identifier, :with => /^(?!\d+$)[a-z0-9\-_]*$/, :if => Proc.new { |p| p.identifier_changed? }
74 74
  # reserved words
75 75
  validates_exclusion_of :identifier, :in => %w( new )
76 76