From: Tom Hughes Date: Sun, 4 Jun 2017 21:49:10 +0000 (+0100) Subject: Use distinct instead of uniq which is deprecated X-Git-Tag: live~3346 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/4248e10946c9f60020112c969591b867c6f8fb19?hp=9dafeda080b55efd19431da1e6689888faf07678 Use distinct instead of uniq which is deprecated --- 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]