]> git.openstreetmap.org Git - rails.git/blobdiff - app/helpers/user_roles_helper.rb
Fix new rubocop warnings
[rails.git] / app / helpers / user_roles_helper.rb
index 384fb7280f2a9152241abb7bb2b17a5dfcd6d418..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)