Sha256: 63eefda7e1a43fca9df26eb0ecbc16ea7c3c3ca8bef3509738d38610b7092400
Contents?: true
Size: 489 Bytes
Versions: 1
Compression:
Stored size: 489 Bytes
Contents
module AssetBox 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 = content_tag(:i, nil, html_options) html << ' ' << text.to_s unless text.blank? html end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
asset_box-0.1.0 | lib/asset_box/rails/helpers.rb |