Sha256: 100d6c3a77c960906ba435831e0af26f06bf4f40718b678803b4c56992dc1ed3
Contents?: true
Size: 585 Bytes
Versions: 12
Compression:
Stored size: 585 Bytes
Contents
module FontAwesome module Sass module Rails module ViewHelpers def icon(style, name, text = nil, html_options = {}) text, html_options = nil, text if text.is_a?(Hash) content_class = "#{style} fa-#{name}" content_class << " #{html_options[:class]}" if html_options.key?(:class) html_options[:class] = content_class html_options['aria-hidden'] ||= true html = content_tag(:i, nil, html_options) html << ' ' << text.to_s unless text.blank? html end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems