workaround: so utiliza nome amigavel quando nao danifica a url

This commit is contained in:
2008-04-08 06:08:34 -03:00
parent 58e04e23f1
commit 2dc4416dad
2 changed files with 2 additions and 2 deletions

View File

@@ -81,7 +81,7 @@ class User < ActiveRecord::Base
end end
def to_param def to_param
self.login self.login.match(/^[-_a-z0-9]*$/i).nil? ? self.id : self.login
end end
protected protected

View File

@@ -48,7 +48,7 @@ class WikiPage < ActiveRecord::Base
end end
def to_param def to_param
self.title['/'].nil? ? self.title : self.id self.title.match(/^[-_a-z0-9]*$/i).nil? ? self.id : self.title
end end
def WikiPage.diff(from, to) def WikiPage.diff(from, to)