Sha256: 763bb62f84539e1d9b74ccd77b4f37c92aa655210563963f0bbb19200c3afa3c
Contents?: true
Size: 302 Bytes
Versions: 31
Compression:
Stored size: 302 Bytes
Contents
module SemanticIconHelper def semantic_icon(*names) opts = names[-1].is_a?(Hash) ? names.delete_at(-1) : {} icon_classes = names.map{|name| "#{name.to_s.gsub('_','-')}" } << 'icon' opts[:class] = [opts[:class], icon_classes].flatten.reject(&:nil?) content_tag :i, nil, opts end end
Version data entries
31 entries across 31 versions & 2 rubygems