Sha256: d011cdcb6fbfa2f1aca4a095e9010d37468242039e45f7ed59769ecd8d08f42f
Contents?: true
Size: 303 Bytes
Versions: 24
Compression:
Stored size: 303 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.tr('_', '-').to_s } << 'icon' opts[:class] = [opts[:class], icon_classes].flatten.reject(&:nil?) content_tag :i, nil, opts end end
Version data entries
24 entries across 24 versions & 1 rubygems