Sha256: dd8af71ded5505dd1f941988a32f37f8d3ccad3a8bcaa676c0b9d048999dd104

Contents?: true

Size: 383 Bytes

Versions: 6

Compression:

Stored size: 383 Bytes

Contents

module Railsstrap
  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
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
railsstrap-3.3.4 app/helpers/railsstrap/badge_label_helper.rb
railsstrap-3.3.1 app/helpers/railsstrap/badge_label_helper.rb
railsstrap-3.3.0 app/helpers/railsstrap/badge_label_helper.rb
railsstrap-3.2.0.3 app/helpers/railsstrap/badge_label_helper.rb
railsstrap-3.2.0.2 app/helpers/railsstrap/badge_label_helper.rb
railsstrap-3.2.0.1 app/helpers/railsstrap/badge_label_helper.rb