diff options
author | Rafael França <rafaelmfranca@gmail.com> | 2016-08-23 00:48:04 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-08-23 00:48:04 -0300 |
commit | cea338d82e2eeebd355401883d785301c880d647 (patch) | |
tree | cc394633a5d3c9e9999503b6eb411ad22626d69e /actionview/lib/action_view | |
parent | 7f4b16ed83b878df6a68d471d2d5e7c719b40261 (diff) | |
parent | 735556d6ccbce382724b7c5dc63109c9b324d1ca (diff) | |
download | rails-cea338d82e2eeebd355401883d785301c880d647.tar.gz rails-cea338d82e2eeebd355401883d785301c880d647.tar.bz2 rails-cea338d82e2eeebd355401883d785301c880d647.zip |
Merge pull request #26254 from badosu/improve-tag-option
Improve #tag_option performance
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r-- | actionview/lib/action_view/helpers/tag_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionview/lib/action_view/helpers/tag_helper.rb b/actionview/lib/action_view/helpers/tag_helper.rb index 4950f272a4..24c6d03cd1 100644 --- a/actionview/lib/action_view/helpers/tag_helper.rb +++ b/actionview/lib/action_view/helpers/tag_helper.rb @@ -86,11 +86,11 @@ module ActionView def tag_option(key, value, escape) if value.is_a?(Array) - value = escape ? safe_join(value, " ") : value.join(" ") + value = escape ? safe_join(value, " ".freeze) : value.join(" ".freeze) else value = escape ? ERB::Util.unwrapped_html_escape(value) : value.to_s end - %(#{key}="#{value.gsub(/"/, '"'.freeze)}") + %(#{key}="#{value.gsub('"'.freeze, '"'.freeze)}") end private |