diff options
author | Go MAEDA <maeda@farend.jp> | 2018-08-12 23:40:44 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2018-08-12 23:40:44 +0000 |
commit | b7f15fbadcaed2b708aa156048ab5c37cb7b01ff (patch) | |
tree | c87103a67f1cf7ec2c2ceb3aa441c5525493b8f8 /app/controllers | |
parent | 02191a08fdd2b4267167230525dfbe676d751ce9 (diff) | |
download | redmine-b7f15fbadcaed2b708aa156048ab5c37cb7b01ff.tar.gz redmine-b7f15fbadcaed2b708aa156048ab5c37cb7b01ff.zip |
Replace String#gsub with faster String#tr (#29363).
Patch by Go MAEDA.
git-svn-id: http://svn.redmine.org/redmine/trunk@17469 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/sys_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/sys_controller.rb b/app/controllers/sys_controller.rb index bd8238a6a..35886fc4e 100644 --- a/app/controllers/sys_controller.rb +++ b/app/controllers/sys_controller.rb @@ -38,7 +38,7 @@ class SysController < ActionController::Base repository.safe_attributes = params[:repository] repository.project = project if repository.save - render :json => {repository.class.name.underscore.gsub('/', '-') => {:id => repository.id, :url => repository.url}}, :status => 201 + render :json => {repository.class.name.underscore.tr('/', '-') => {:id => repository.id, :url => repository.url}}, :status => 201 else head 422 end |