]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/user_roles_helper.rb
Merge remote-tracking branch 'upstream/pull/3015'
[rails.git] / app / helpers / user_roles_helper.rb
index 43807659243f47f1ddf6c8d91eccfb43701cb192..79e7cc012ad1e2c32e25a1f9df21c20bb983c4dc 100644 (file)
@@ -1,8 +1,6 @@
 module UserRolesHelper
   def role_icons(user)
-    UserRole::ALL_ROLES.reduce("".html_safe) do |acc, elem|
-      acc + " " + role_icon(user, elem)
-    end
+    safe_join(UserRole::ALL_ROLES.collect { |role| role_icon(user, role) }.compact, " ")
   end
 
   def role_icon(user, role)