notifications by created at date so they stop jumping when you make them read

This commit is contained in:
Maxwell Salzberg 2011-05-17 14:44:28 -07:00
parent 0c62277961
commit e95288e074

View file

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