Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Only show each note once is the user notes view

  • Loading branch information...
commit 8e5364b2f2162568cb23263cea9ad69122546ff7 1 parent 43f39c5
@tomhughes authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  app/controllers/notes_controller.rb
View
2  app/controllers/notes_controller.rb
@@ -239,7 +239,7 @@ def mine
@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]
Please sign in to comment.
Something went wrong with that request. Please try again.