mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Merge pull request #4260 from jamescook/james/replace-certain-gsub-with-tr
Replace certain uses of 'gsub' with 'tr' / 'chomp' for a speed improvement
This commit is contained in:
@@ -203,7 +203,7 @@ SQL
|
||||
end
|
||||
|
||||
def i18n_name
|
||||
self.name.downcase.gsub(' ', '_')
|
||||
self.name.downcase.tr(' ', '_')
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ TopicStatusUpdate = Struct.new(:topic, :user) do
|
||||
end
|
||||
|
||||
def locale_key
|
||||
"topic_statuses.#{action_code.gsub('.', '_')}"
|
||||
"topic_statuses.#{action_code.tr('.', '_')}"
|
||||
end
|
||||
|
||||
def reopening_topic?
|
||||
|
||||
Reference in New Issue
Block a user