- day_users = day_users.keys.map { |u| User.find(u).display_name.gsub('@', ' at ').gsub('.', ' dot ') }
- week_users = week_users.keys.map { |u| User.find(u).display_name.gsub('@', ' at ').gsub('.', ' dot ') }
- month_users = month_users.keys.map { |u| User.find(u).display_name.gsub('@', ' at ').gsub('.', ' dot ') }
-
- SyncEnumerator.new(day_users, week_users, month_users).each do |day,week,month|
- puts "<tr><td>#{day}</td><td>#{week}</td><td>#{month}</td></tr>"
+ SyncEnumerator.new(day_users, week_users, month_users).each do |row|
+ puts "<tr>"
+ row.each do |column|
+ if column.nil?
+ puts "<td></td>"
+ else
+ display_name = User.find(column[0]).display_name.gsub('@', ' at ').gsub('.', ' dot ')
+ count = column[1]
+ puts "<td>#{count} <a href=\"/user/#{display_name}\">#{display_name}</a></td>"
+ end
+ end
+ puts "</tr>"