mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 10:50:21 +08:00
Replace certain uses of 'gsub' with 'tr' or 'chomp' for a speed
improvement
This commit is contained in:
parent
d1c5949922
commit
c0e25b5a9a
9 changed files with 15 additions and 16 deletions
|
@ -20,9 +20,9 @@ module Slug
|
|||
private
|
||||
|
||||
def self.ascii_generator(string)
|
||||
string.gsub("'", "")
|
||||
string.tr("'", "")
|
||||
.parameterize
|
||||
.gsub("_", "-")
|
||||
.tr("_", "-")
|
||||
end
|
||||
|
||||
def self.encoded_generator(string)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue