mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
slug should replace underscores
This commit is contained in:
parent
37b0c168bf
commit
44642d4d0c
|
@ -6,7 +6,7 @@
|
||||||
module Slug
|
module Slug
|
||||||
|
|
||||||
def self.for(string)
|
def self.for(string)
|
||||||
string.parameterize
|
string.parameterize.gsub("_", "-")
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -39,5 +39,9 @@ describe Slug do
|
||||||
Slug.for(from).should == to
|
Slug.for(from).should == to
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it 'replaces underscores' do
|
||||||
|
Slug.for("o_o_o").should == "o-o-o"
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user