]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/user_roles_helper.rb
Merge remote-tracking branch 'upstream/pull/3217'
[rails.git] / app / helpers / user_roles_helper.rb
index 43807659243f47f1ddf6c8d91eccfb43701cb192..15231f4d066206575e457e3a7d3a2a7b5ccc2796 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.filter_map { |role| role_icon(user, role) }, " ")
   end
 
   def role_icon(user, role)