PERF: Avoid parsing Post#cooked with Nokogiri for every search.

This commit is contained in:
Guo Xiang Tan
2020-07-17 16:27:30 +08:00
committed by Alan Guo Xiang Tan
parent b979579c1b
commit 181c4eb760
7 changed files with 64 additions and 33 deletions

View File

@ -10,7 +10,7 @@ class SimilarTopicsController < ApplicationController
attr_reader :topic
def blurb
Search::GroupedSearchResults.blurb_for(@topic.try(:blurb))
Search::GroupedSearchResults.blurb_for(cooked: @topic.try(:blurb))
end
end