make notifications updated_at rather than created at
This commit is contained in:
parent
6694485388
commit
67ed035f21
3 changed files with 4 additions and 5 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue