From 67ed035f21f69b6224616dd91c1635673a14b029 Mon Sep 17 00:00:00 2001 From: maxwell Date: Tue, 1 Feb 2011 21:45:25 -0800 Subject: [PATCH] make notifications updated_at rather than created at --- app/controllers/notifications_controller.rb | 4 ++-- app/views/notifications/index.html.haml | 2 +- app/views/notifications/index.mobile.haml | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/controllers/notifications_controller.rb b/app/controllers/notifications_controller.rb index 053b417dc..4542f8668 100644 --- a/app/controllers/notifications_controller.rb +++ b/app/controllers/notifications_controller.rb @@ -19,8 +19,8 @@ class NotificationsController < ApplicationController def index @notifications = Notification.find(:all, :conditions => {:recipient_id => current_user.id}, - :order => 'created_at desc', :include => [:target, {:actors => :profile}]).paginate :page => params[:page], :per_page => 25 - @group_days = @notifications.group_by{|note| note.created_at.strftime("%B %d") } + :order => 'updated_at desc', :include => [:target, {:actors => :profile}]).paginate :page => params[:page], :per_page => 25 + @group_days = @notifications.group_by{|note| note.updated_at.strftime("%B %d") } respond_with @notifications end diff --git a/app/views/notifications/index.html.haml b/app/views/notifications/index.html.haml index 8412a92b5..5f2d4a33b 100644 --- a/app/views/notifications/index.html.haml +++ b/app/views/notifications/index.html.haml @@ -41,5 +41,5 @@ = notification_people_link(note) = object_link(note) - %span.time= timeago(note.created_at) + %span.time= timeago(note.updated_at) = will_paginate @notifications diff --git a/app/views/notifications/index.mobile.haml b/app/views/notifications/index.mobile.haml index 64d945380..4ebc5a9ca 100644 --- a/app/views/notifications/index.mobile.haml +++ b/app/views/notifications/index.mobile.haml @@ -15,8 +15,7 @@ .content %span.from %b= note.actor.name - = object_link(note) - .time= timeago(note.created_at) + .time= timeago(note.updated_at) = will_paginate @notifications