ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

CP_underscore_in_identifier.patch

Derek Montgomery, 2011-02-04 08:30 pm

Download (695 Bytes)

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