Sha256: e8ccbdca60ec522d730f842c982e61fbbb38f58ebbaf3d10af6c975abcf2b1d3
Contents?: true
Size: 518 Bytes
Versions: 10
Compression:
Stored size: 518 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
10 entries across 10 versions & 1 rubygems