Skip to content
Extraits de code Groupes Projets
Valider ea3b7192 rédigé par Gonzalo Rodriguez's avatar Gonzalo Rodriguez
Parcourir les fichiers

Fixed notifications time-ago calculation

parent 5a239071
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -19,7 +19,7 @@ class NotificationsController < ApplicationController ...@@ -19,7 +19,7 @@ class NotificationsController < ApplicationController
def index def index
@notifications = Notification.find(:all, :conditions => {:recipient_id => current_user.id}, @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 :order => 'created_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')) } @group_days = @notifications.group_by{|note| I18n.l(note.updated_at, :format => I18n.t('date.formats.fullmonth_day')) }
respond_with @notifications respond_with @notifications
end end
......
...@@ -41,5 +41,5 @@ ...@@ -41,5 +41,5 @@
= notification_people_link(note) = notification_people_link(note)
= object_link(note) = object_link(note)
%span.time= timeago(note.updated_at) %span.time= timeago(note.created_at)
= will_paginate @notifications = will_paginate @notifications
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter