X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/56db9ca2b7e2475cd8025630049fb4a4b824f2d9..8e5364b2f2162568cb23263cea9ad69122546ff7:/app/controllers/notes_controller.rb?ds=sidebyside diff --git a/app/controllers/notes_controller.rb b/app/controllers/notes_controller.rb index d25d9a37e..1f5b990cc 100644 --- a/app/controllers/notes_controller.rb +++ b/app/controllers/notes_controller.rb @@ -236,10 +236,10 @@ class NotesController < ApplicationController if @this_user = User.active.find_by_display_name(params[:display_name]) @title = t 'note.mine.title', :user => @this_user.display_name @heading = t 'note.mine.heading', :user => @this_user.display_name - @description = t 'note.mine.description', :user => render_to_string(:partial => "user", :object => @this_user) + @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]