Project

General

Profile

« Previous | Next » 

Revision 1108

Do not authorize project identifier with numbers only (would be interpreted as the project id in urls).

View differences:

trunk/app/models/project.rb
217 217
  def validate
218 218
    errors.add(parent_id, " must be a root project") if parent and parent.parent
219 219
    errors.add_to_base("A project with subprojects can't be a subproject") if parent and children.size > 0
220
    errors.add(:identifier, :activerecord_error_invalid) if !identifier.blank? && identifier.match(/^\d*$/)
220 221
  end
221 222
  
222 223
private

Also available in: Unified diff