module PhantomHelpers::ViewHelpers::CountHelper
Public Instance Methods
count_div(html_class, &block)
click to toggle source
# File lib/phantom_helpers/view_helpers/count_helper.rb, line 5 def count_div(html_class, &block) content_tag :h3, class: "mt-xs #{html_class}" do block.call end end
print_count(count, text)
click to toggle source
# File lib/phantom_helpers/view_helpers/count_helper.rb, line 11 def print_count(count, text) count != 0 ? text + '(' + count.to_s + ')' : text end