From 8c0dcdde08faa5bb11637ff73e6bfb6fdda2c9c2 Mon Sep 17 00:00:00 2001 From: Raphael Sofaer <raphael@joindiaspora.com> Date: Tue, 12 Apr 2011 14:06:58 -0700 Subject: [PATCH] Notifications should be sorted by updated_at --- app/controllers/notifications_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/notifications_controller.rb b/app/controllers/notifications_controller.rb index 1d6963d260..84c30ab061 100644 --- a/app/controllers/notifications_controller.rb +++ b/app/controllers/notifications_controller.rb @@ -19,7 +19,7 @@ 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 + :order => 'updated_at desc', :include => [:target, {:actors => :profile}]).paginate :page => params[:page], :per_page => 25 @group_days = @notifications.group_by{|note| I18n.l(note.updated_at, :format => I18n.t('date.formats.fullmonth_day')) } respond_with @notifications end -- GitLab