Sha256: a7bd2220b442ced32c25e4118e4a456e2063ca018bd5f77f471a3f2ef0f434a9
Contents?: true
Size: 427 Bytes
Versions: 3
Compression:
Stored size: 427 Bytes
Contents
# Renders icon from icon font. # First part of the +name+ defines icon family. # # Example: # <%= icon 'fa-caret-right' %> # => icon 'caret-right' from Font Awesome (fa) family # <%= icon 'glyphicon-tick' %> #=> icon 'tick' from Boostrap glyphicons # def icon( name, opts = {} ) icon_family = name.split('-').first icon_class = "#{icon_family} #{name} #{opts[:class]}" tag :i, "", opts.merge( class: icon_class ) end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
aerogel-core-1.4.12 | app/helpers/icon.rb |
aerogel-core-1.4.11 | app/helpers/icon.rb |
aerogel-core-1.4.10 | app/helpers/icon.rb |