diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-05-29 17:42:10 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-05-29 17:42:10 +0000 |
commit | 39216f327c632fd9c2ed74294b0753e610235d68 (patch) | |
tree | c6e5d4283694fa46f769d62ded893d402c7f03df /app/models/project.rb | |
parent | eb0e218603fb334f3281515f15b23b246c6b351d (diff) | |
download | redmine-39216f327c632fd9c2ed74294b0753e610235d68.tar.gz redmine-39216f327c632fd9c2ed74294b0753e610235d68.zip |
Fixed: can not access old projects created with a numeric identifier (#1322).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1473 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/project.rb')
-rw-r--r-- | app/models/project.rb | 3 |
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? |