summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/project.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/project.rb b/app/models/project.rb
index e560f1dac..f05ccb2af 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -144,7 +144,8 @@ class Project < ActiveRecord::Base
end
def to_param
- identifier
+ # id is used for projects with a numeric identifier (compatibility)
+ @to_param ||= (identifier.to_s =~ %r{^\d*$} ? id : identifier)
end
def active?