Sha256: 0f649224aad8bffc9baae358de1c59a045fad0971c28908631366b67ff9256c0
Contents?: true
Size: 519 Bytes
Versions: 42
Compression:
Stored size: 519 Bytes
Contents
# frozen_string_literal: true module Thredded class Stats include ActionView::Helpers::NumberHelper def messageboards_count number_to_human(messageboards.count, precision: 4) end def topics_count number_to_human(messageboards.map(&:topics_count).sum, precision: 4) end def posts_count number_to_human(messageboards.map(&:posts_count).sum, precision: 5) end private def messageboards @messageboards ||= Thredded::Messageboard.ordered end end end
Version data entries
42 entries across 42 versions & 2 rubygems