change intro explorer to use popular searches
This commit is contained in:
@@ -1,11 +1,7 @@
|
||||
class IntroPresenter
|
||||
def popular_tags
|
||||
Tag.where("category = 3").order("post_count desc").limit(8).map(&:name)
|
||||
end
|
||||
|
||||
def each
|
||||
popular_tags.each do |tag|
|
||||
yield(tag, PostSets::Intro.new(tag))
|
||||
PopularSearchService.new(Date.today, "week").each_search(20) do |query, count|
|
||||
yield(query, PostSets::Intro.new(query))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user