From 8e5364b2f2162568cb23263cea9ad69122546ff7 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 3 Feb 2013 11:07:01 +0000 Subject: [PATCH] Only show each note once is the user notes view --- app/controllers/notes_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/notes_controller.rb b/app/controllers/notes_controller.rb index 11d0f8cb4..1f5b990cc 100644 --- a/app/controllers/notes_controller.rb +++ b/app/controllers/notes_controller.rb @@ -239,7 +239,7 @@ class NotesController < ApplicationController @description = t 'note.mine.subheading', :user => render_to_string(:partial => "user", :object => @this_user) @page = (params[:page] || 1).to_i @page_size = 10 - @notes = @this_user.notes.order("updated_at DESC").offset((@page - 1) * @page_size).limit(@page_size).preload(:comments => :author) + @notes = @this_user.notes.order("updated_at DESC, id").uniq.offset((@page - 1) * @page_size).limit(@page_size).preload(:comments => :author) else @title = t 'user.no_such_user.title' @not_found_user = params[:display_name] -- 2.39.5