mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-23 23:58:31 -05:00
Merge pull request #164 from danneu/slug-fix
slug should replace underscores
This commit is contained in:
commit
5628bac5c3
2 changed files with 5 additions and 1 deletions
|
@ -6,7 +6,7 @@
|
|||
module Slug
|
||||
|
||||
def self.for(string)
|
||||
string.parameterize
|
||||
string.parameterize.gsub("_", "-")
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -39,5 +39,9 @@ describe Slug do
|
|||
Slug.for(from).should == to
|
||||
end
|
||||
|
||||
it 'replaces underscores' do
|
||||
Slug.for("o_o_o").should == "o-o-o"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue