OSDN Git Service
(root)
/
redminele
/
redmine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb0e218
)
Fixed: can not access old projects created with a numeric identifier (#1322).
author
Jean-Philippe Lang
<jp_lang@yahoo.fr>
Thu, 29 May 2008 17:42:10 +0000
(17:42 +0000)
committer
Jean-Philippe Lang
<jp_lang@yahoo.fr>
Thu, 29 May 2008 17:42:10 +0000
(17:42 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1473
e93f8b46
-1217-0410-a6f0-
8f06a7374b81
app/models/project.rb
patch
|
blob
|
history
diff --git
a/app/models/project.rb
b/app/models/project.rb
index
e560f1d
..
f05ccb2
100644
(file)
--- 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?