]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/browse_helper.rb
Add an ACL check to allow trace downloads to be blocked
[rails.git] / app / helpers / browse_helper.rb
index a41b39a3deac07a9c7165648b1946a885b1bae18..ebcd58dd042b7671ed5f8e9dfd462189899deb07 100644 (file)
@@ -4,7 +4,12 @@ module BrowseHelper
   end
 
   def printable_name(object, version=false)
-    name = t 'printable_name.with_id', :id => object.id.to_s
+    if object.id.is_a?(Array)
+      id = object.id[0]
+    else
+      id = object.id
+    end
+    name = t 'printable_name.with_id', :id => id.to_s
     if version
       name = t 'printable_name.with_version', :id => name, :version => object.version.to_s
     end