summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/sys_controller.rb2
-rw-r--r--app/helpers/application_helper.rb2
-rw-r--r--app/models/mailer.rb2
-rw-r--r--app/models/query.rb2
4 files changed, 4 insertions, 4 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
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index b7d838034..58b988454 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -512,7 +512,7 @@ module ApplicationHelper
end
def anchor(text)
- text.to_s.gsub(' ', '_')
+ text.to_s.tr(' ', '_')
end
def html_hours(text)
diff --git a/app/models/mailer.rb b/app/models/mailer.rb
index ba6a67757..466ebe467 100644
--- a/app/models/mailer.rb
+++ b/app/models/mailer.rb
@@ -447,7 +447,7 @@ class Mailer < ActionMailer::Base
'X-Auto-Response-Suppress' => 'All',
'Auto-Submitted' => 'auto-generated',
'From' => Setting.mail_from,
- 'List-Id' => "<#{Setting.mail_from.to_s.gsub('@', '.')}>"
+ 'List-Id' => "<#{Setting.mail_from.to_s.tr('@', '.')}>"
# Replaces users with their email addresses
[:to, :cc, :bcc].each do |key|
diff --git a/app/models/query.rb b/app/models/query.rb
index e32dda865..fa5c926ba 100644
--- a/app/models/query.rb
+++ b/app/models/query.rb
@@ -880,7 +880,7 @@ class Query < ActiveRecord::Base
filters_clauses << sql_for_custom_field(field, operator, v, $1)
elsif field =~ /^cf_(\d+)\.(.+)$/
filters_clauses << sql_for_custom_field_attribute(field, operator, v, $1, $2)
- elsif respond_to?(method = "sql_for_#{field.gsub('.','_')}_field")
+ elsif respond_to?(method = "sql_for_#{field.tr('.','_')}_field")
# specific statement
filters_clauses << send(method, field, operator, v)
else