Sha256: 98e0b6cf4773f33c59df6b9f784427fc5873e9db3aa9252f91246c3bf3af380f
Contents?: true
Size: 853 Bytes
Versions: 6
Compression:
Stored size: 853 Bytes
Contents
require 'bh/helpers/base_helper' module Bh # Provides methods to include Glyphicons. # @see http://getbootstrap.com/components/#glyphicons module GlyphiconHelper include BaseHelper # Returns an HTML block tag that follows the Bootstrap documentation # on how to display *glyphicons*. # @return [String] an HTML block tag for a glyphicon. # @param [#to_s] the name of the icon to display, with either dashes or # underscores to separate multiple words. # @example Display the "zoom in" glyphicon # glyphicon :zoom_in # @example Display the "zoom out" glyphicon # glyphicon 'zoom-out' def glyphicon(name = nil, options = {}) append_class! options, 'glyphicon' append_class! options, "glyphicon-#{name.to_s.gsub '_', '-'}" if name content_tag :span, nil, options end end end
Version data entries
6 entries across 6 versions & 1 rubygems