From ea3b719253a8f029ec8f80e9a16b2e4dc1de4480 Mon Sep 17 00:00:00 2001 From: Gonzalo Rodriguez <gonzalo@wyeworks.com> Date: Sun, 20 Feb 2011 05:13:02 -0200 Subject: [PATCH] Fixed notifications time-ago calculation --- app/controllers/notifications_controller.rb | 2 +- app/views/notifications/index.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/notifications_controller.rb b/app/controllers/notifications_controller.rb index bbc760c2f3..fc9e73cf3e 100644 --- a/app/controllers/notifications_controller.rb +++ b/app/controllers/notifications_controller.rb @@ -19,7 +19,7 @@ class NotificationsController < ApplicationController def index @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')) } respond_with @notifications end diff --git a/app/views/notifications/index.html.haml b/app/views/notifications/index.html.haml index 5f2d4a33b1..8412a92b59 100644 --- a/app/views/notifications/index.html.haml +++ b/app/views/notifications/index.html.haml @@ -41,5 +41,5 @@ = notification_people_link(note) = object_link(note) - %span.time= timeago(note.updated_at) + %span.time= timeago(note.created_at) = will_paginate @notifications -- GitLab