Sha256: 0387e9d64a4256dcae0d30f5e3dd5bd296c999c65a9c5ce14f4dd7cb6f773d23

Contents?: true

Size: 333 Bytes

Versions: 15

Compression:

Stored size: 333 Bytes

Contents

module BadgeLabelHelper
  def badge(*args)
    badge_label(:badge, *args)
  end

  def tag_label(*args)
    badge_label(:label, *args)
  end

  private
  def badge_label(what, value, type = nil)
    klass = [what]
    klass << "#{what}-#{type}" if type.present?
    content_tag :span, value, :class => "#{klass.join(' ')}"
  end
end

Version data entries

15 entries across 15 versions & 4 rubygems

Version Path
twitter-bootstrap-rails-5.0.0 app/helpers/badge_label_helper.rb
bootstrap_plus-0.1.0 app/helpers/badge_label_helper.rb
twitter-bootstrap-rails-4.0.0 app/helpers/badge_label_helper.rb
twitter-bootstrap-rails-3.2.2 app/helpers/badge_label_helper.rb
twitter-bootstrap-rails-3.2.1.rc1 app/helpers/badge_label_helper.rb
twitter-bootstrap-rails-3.2.0 app/helpers/badge_label_helper.rb
devbootsrap-0.0.7 app/helpers/badge_label_helper.rb
devbootsrap-0.0.6 app/helpers/badge_label_helper.rb
devbootsrap-0.0.5 app/helpers/badge_label_helper.rb
devbootsrap-0.0.4 app/helpers/badge_label_helper.rb
devbootsrap-0.0.3 app/helpers/badge_label_helper.rb
twitter-bootstrap3-rails-3.2.7.1 app/helpers/badge_label_helper.rb
twitter-bootstrap3-rails-3.2.7 app/helpers/badge_label_helper.rb
twitter-bootstrap-rails-2.2.8 app/helpers/badge_label_helper.rb
twitter-bootstrap-rails-2.2.7 app/helpers/badge_label_helper.rb