From: Jean-Philippe Lang Date: Fri, 26 Dec 2014 12:23:05 +0000 (+0000) Subject: Preload wiki page content for search results. X-Git-Tag: 3.0.0~185 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1699e37a0cad57f20ca1c8395314901dc59010f3;p=redmine.git Preload wiki page content for search results. git-svn-id: http://svn.redmine.org/redmine/trunk@13814 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb index 8d81bce7e..32d043355 100644 --- a/app/models/wiki_page.rb +++ b/app/models/wiki_page.rb @@ -34,7 +34,7 @@ class WikiPage < ActiveRecord::Base acts_as_searchable :columns => ['title', "#{WikiContent.table_name}.text"], :scope => joins(:content, {:wiki => :project}), - :preload => {:wiki => :project}, + :preload => [:content, {:wiki => :project}], :permission => :view_wiki_pages, :project_key => "#{Wiki.table_name}.project_id"