/notifications is now pretty cool

This commit is contained in:
maxwell 2010-12-17 12:25:33 -08:00
parent 2545de6470
commit 807187ded9
2 changed files with 11 additions and 8 deletions

View file

@ -16,6 +16,6 @@ class NotificationsController < ApplicationController
end
def index
@group_days = @notifications.group_by{|note| note.created_at.strftime("%B %d") }
end
end

View file

@ -1,8 +1,11 @@
%ul
- @notifications.each do |note|
%li
%h3
= link_to "#{note.person.name.titleize}", person_path(note.person)
= object_link(note)
%span.description=" #{t('ago', :time => time_ago_in_words(note.created_at))}"
- @group_days.each do |day, notes|
%h3
%ul
%li
= day
- notes.each do |note|
%li
= link_to "#{note.person.name.titleize}", person_path(note.person)
= object_link(note)
%span.description=" #{t('ago', :time => time_ago_in_words(note.created_at))}"