Sha256: d1a993a083635f1dd06ab816fb173fbef39a403e757513129d1dbe980118cf32
Contents?: true
Size: 476 Bytes
Versions: 62
Compression:
Stored size: 476 Bytes
Contents
module Workarea module Admin class HelpSearchViewModel < SearchViewModel def top_categories @top_categories ||= Help::Article.top_categories end def top_articles_by_category @top_articles_by_category ||= top_categories.reduce({}) do |memo, category| articles = Help::Article.in_category(category).recent.top.to_a memo[category] = articles if articles.present? memo end end end end end
Version data entries
62 entries across 62 versions & 1 rubygems