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, ={}) return if content.blank? tag = .delete(:tag).try(:to_sym).presence || :span prepend_class(, 'badge') content_tag tag, content, end |