]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/browse_tags_helper.rb
Prefer string interpolation to concatenation
[rails.git] / app / helpers / browse_tags_helper.rb
index 1c36743f8b9caa12646be81829c1df9e454d770c..1466649146ea3fba36a59f874442c68b778a433f 100644 (file)
@@ -84,8 +84,8 @@ module BrowseTagsHelper
       # Contains a reference to a section of the wikipedia article
       # Must break it up to correctly build the url
       value = Regexp.last_match(1)
-      section = "#" + Regexp.last_match(2)
-      encoded_section = "#" + CGI.escape(Regexp.last_match(2).gsub(/ +/, "_")).tr("%", ".")
+      section = "##{Regexp.last_match(2)}"
+      encoded_section = "##{CGI.escape(Regexp.last_match(2).gsub(/ +/, '_')).tr('%', '.')}"
     else
       section = ""
       encoded_section = ""