Module: BadgeHelper

Includes:
FormatHelper
Defined in:
app/helpers/badge_helper.rb

Instance Method Summary collapse

Methods included from FormatHelper

#prepend_class, #squeeze_n_strip

Instance Method Details

#badge(content = nil, options = {}) ⇒ Object



4
5
6
7
8
9
10
11
# File 'app/helpers/badge_helper.rb', line 4

def badge(content=nil, options={})
  return if content.blank?

  tag = options.delete(:tag).try(:to_sym).presence || :span
  prepend_class(options, 'badge')

   tag, content, options
end