From 6598a44ddde476fb1d5d010fbadf2fdb7db2597e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felix=20Sch=C3=A4fer?= <f.schaefer@finn.de>
Date: Thu, 19 May 2011 23:48:02 +0200
Subject: [PATCH] Add a helper to format user lists. #304

---
 app/helpers/application_helper.rb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 67509b221..fc4ef6ef8 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -60,6 +60,11 @@ module ApplicationHelper
       h(user.to_s)
     end
   end
+  
+  # Show a sorted linkified (if active) comma-joined list of users
+  def list_users(users, options={})
+    users.sort.collect{|u| link_to_user(u, options)}.join(", ")
+  end
 
   # Displays a link to +issue+ with its subject.
   # Examples:
-- 
GitLab