activeadmin/activeadmin — pull request #3505 by vladimir-tikhonov (2014-10-21 09:44:42+00:00)
Title: Replace gsub with tr

Benchmark shows that `gsub` is 6.5x slower than `tr`
```ruby
require 'benchmark/ips'

Benchmark.ips do |x|
str = 'The quick brown fox jumps over the lazy dog'
x.report("gsub") { str.gsub(' ', '_') }
x.report("tr") { str.tr(' ', '_') }

x.compare!
end
```
> gsub 227386.5 (±2.2%) i/s - 1138138 in 5.007935s
> tr 1477767.9 (±2.2%) i/s - 7416100 in 5.021170s
> Comparison:
> tr: 1477767.9 i/s
> gsub: 227386.5 i/s - 6.50x slower