Module: PhantomHelpers::ViewHelpers::CountHelper
- Defined in:
- lib/phantom_helpers/view_helpers/count_helper.rb
Instance Method Summary collapse
Instance Method Details
#count_div(html_class, &block) ⇒ Object
5 6 7 8 9 |
# 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) ⇒ Object
11 12 13 |
# File 'lib/phantom_helpers/view_helpers/count_helper.rb', line 11 def print_count(count, text) count != 0 ? text + '(' + count.to_s + ')' : text end |