diff options
author | Adrian Rangel <adrian.rangel@gmail.com> | 2014-10-01 02:19:52 -0500 |
---|---|---|
committer | Adrian Rangel <adrian.rangel@gmail.com> | 2014-10-01 02:19:52 -0500 |
commit | 56d26d1d9fd82a39c38228759889df5173992db3 (patch) | |
tree | 7f0403c8ba48279670ee5eccec45f9e8726d916c /actionview/lib | |
parent | 1f14b9f535682217d855ef382c3b85314066c5ab (diff) | |
download | rails-56d26d1d9fd82a39c38228759889df5173992db3.tar.gz rails-56d26d1d9fd82a39c38228759889df5173992db3.tar.bz2 rails-56d26d1d9fd82a39c38228759889df5173992db3.zip |
use tr instead of gsub when possible
Diffstat (limited to 'actionview/lib')
-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: |