Notifications should be sorted by updated_at

This commit is contained in:
Raphael Sofaer 2011-04-12 14:06:58 -07:00
parent 363ef2c276
commit 8c0dcdde08

View file

@ -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