]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/browse_helper.rb
Show linked features as collapsable detail panels on feature browse pages
[rails.git] / app / helpers / browse_helper.rb
index cf2bc64742dc6faebb72e511a7c9ebb958b537e2..1e9465f8035d179a1b6592a6a0bbf820f86d4eab 100644 (file)
@@ -13,7 +13,7 @@ module BrowseHelper
     unless object.redacted?
       available_locales = Locale.list(name_locales(object))
 
-      locale = available_locales.preferred(preferred_languages)
+      locale = available_locales.preferred(preferred_languages, :default => nil)
 
       if object.tags.include? "name:#{locale}"
         name = t "printable_name.with_name_html", :name => tag.bdi(object.tags["name:#{locale}"].to_s), :id => tag.bdi(name)
@@ -44,7 +44,7 @@ module BrowseHelper
     if object.redacted?
       ""
     else
-      h(icon_tags(object).map { |k, v| k + "=" + v }.to_sentence)
+      h(icon_tags(object).map { |k, v| "#{k}=#{v}" }.to_sentence)
     end
   end