diff options
author | Xavier Noria <fxn@hashref.com> | 2014-10-01 12:50:42 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2014-10-01 12:50:42 +0200 |
commit | 6aa448255cd5c640dae45963c114418b76f454e0 (patch) | |
tree | 367ee021420f8e8416e6580a66d7dd7caba21b6a /actionview/lib/action_view/template.rb | |
parent | cd50a6dc1501cefd38caed6169fdc3ab22f88905 (diff) | |
parent | 56d26d1d9fd82a39c38228759889df5173992db3 (diff) | |
download | rails-6aa448255cd5c640dae45963c114418b76f454e0.tar.gz rails-6aa448255cd5c640dae45963c114418b76f454e0.tar.bz2 rails-6aa448255cd5c640dae45963c114418b76f454e0.zip |
Merge pull request #17125 from acrogenesis/master
use tr instead of gsub when possible
Diffstat (limited to 'actionview/lib/action_view/template.rb')
-rw-r--r-- | actionview/lib/action_view/template.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/template.rb b/actionview/lib/action_view/template.rb index eb0f2e8a57..f398f9bfa3 100644 --- a/actionview/lib/action_view/template.rb +++ b/actionview/lib/action_view/template.rb @@ -317,7 +317,7 @@ module ActionView end def method_name #:nodoc: - @method_name ||= "_#{identifier_method_name}__#{@identifier.hash}_#{__id__}".gsub('-', "_") + @method_name ||= "_#{identifier_method_name}__#{@identifier.hash}_#{__id__}".tr('-', "_") end def identifier_method_name #:nodoc: |