From 4248e10946c9f60020112c969591b867c6f8fb19 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sun, 4 Jun 2017 22:49:10 +0100 Subject: [PATCH 1/1] Use distinct instead of uniq which is deprecated --- 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 13e930ca5..1de58af90 100644 --- a/app/controllers/notes_controller.rb +++ b/app/controllers/notes_controller.rb @@ -285,7 +285,7 @@ class NotesController < ApplicationController @page_size = 10 @notes = @this_user.notes @notes = @notes.visible unless @user && @user.moderator? - @notes = @notes.order("updated_at DESC, id").uniq.offset((@page - 1) * @page_size).limit(@page_size).preload(:comments => :author).to_a + @notes = @notes.order("updated_at DESC, id").distinct.offset((@page - 1) * @page_size).limit(@page_size).preload(:comments => :author).to_a else @title = t "user.no_such_user.title" @not_found_user = params[:display_name] -- 2.43.2