From e95288e07449bcb9ce1608faf5d8fe5f9c6606db Mon Sep 17 00:00:00 2001 From: Maxwell Salzberg Date: Tue, 17 May 2011 14:44:28 -0700 Subject: [PATCH] notifications by created at date so they stop jumping when you make them read --- app/controllers/notifications_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/notifications_controller.rb b/app/controllers/notifications_controller.rb index 2e6786321..d6453c78e 100644 --- a/app/controllers/notifications_controller.rb +++ b/app/controllers/notifications_controller.rb @@ -20,8 +20,8 @@ class NotificationsController < ApplicationController def index @aspect = :notification @notifications = Notification.find(:all, :conditions => {:recipient_id => current_user.id}, - :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')) } + :order => 'created_at desc', :include => [:target, {:actors => :profile}]).paginate :page => params[:page], :per_page => 25 + @group_days = @notifications.group_by{|note| I18n.l(note.created_at, :format => I18n.t('date.formats.fullmonth_day')) } respond_with @notifications end