Commit f85498c33804d0c9c0938c228cc48a558df19e68
1 parent
5a16fa8d
Exists in
master
and in
29 other branches
ActionItem24: allowing dots in slugs
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1137 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
2 changed files
with
5 additions
and
1 deletions
Show diff stats
lib/acts_as_filesystem.rb
... | ... | @@ -97,7 +97,7 @@ module ActsAsFileSystem |
97 | 97 | unless self.name.blank? |
98 | 98 | # FIXME encapsulate this pattern (transliterate -> downcase -> gsub |
99 | 99 | # ...) in a String method, say, to_slug |
100 | - self.slug = self.name.transliterate.downcase.gsub( /[^-a-z0-9~\s\.:;+=_]/, '').gsub(/[\s\.:;=_+]+/, '-').gsub(/[\-]{2,}/, '-').to_s | |
100 | + self.slug = self.name.transliterate.downcase.gsub( /[^-a-z0-9~\s\.:;+=_]/, '').gsub(/[\s:;=_+]+/, '-').gsub(/[\-]{2,}/, '-').to_s | |
101 | 101 | end |
102 | 102 | end |
103 | 103 | ... | ... |
test/unit/acts_as_filesystem_test.rb