defer to popular searches for popular tag list
This commit is contained in:
@@ -19,6 +19,10 @@ class PopularSearchService
|
||||
fetch_data.to_s.scan(/(.+?) (\d+)\.0\n/).slice(0, limit).each(&block)
|
||||
end
|
||||
|
||||
def tags
|
||||
fetch_data.to_s.scan(/(.+?) (\d+)\.0\n/).map {|x| x[0]}
|
||||
end
|
||||
|
||||
def fetch_data
|
||||
dates = date.strftime("%Y-%m-%d")
|
||||
|
||||
|
||||
@@ -32,7 +32,11 @@ module PostSetPresenters
|
||||
end
|
||||
|
||||
def popular_tags
|
||||
Tag.trending
|
||||
if PopularSearchService.enabled?
|
||||
PopularSearchService.new(Date.today, "day").tags.slice(0, 25)
|
||||
else
|
||||
Tag.trending
|
||||
end
|
||||
end
|
||||
|
||||
def pattern_tags
|
||||
|
||||
Reference in New Issue
Block a user