workaround: so utiliza nome amigavel quando nao danifica a url
This commit is contained in:
@@ -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
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user