From 04a85f458214304b8d96a1ea052b40e171a3f2f5 Mon Sep 17 00:00:00 2001 From: Ian Morgan Date: Fri, 20 Jul 2012 13:16:19 -0400 Subject: [PATCH] Show wiki comments for all revisions --- 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 9e89140e..3699d8e4 100644 --- a/app/controllers/notes_controller.rb +++ b/app/controllers/notes_controller.rb @@ -52,7 +52,7 @@ class NotesController < ApplicationController when "merge_request" then project.merge_requests.find(params[:target_id]).notes.inc_author.order("created_at DESC").limit(20) when "wiki" - then project.wikis.find(params[:target_id]).notes.order("created_at DESC").limit(20) + then project.wikis.reverse.map {|w| w.notes.fresh }.flatten[0..20] end @notes = if params[:last_id]