Permalink
Browse files

GlyphHelper

  • Loading branch information...
1 parent 50cdfc0 commit b222bdad4c7e34081c9b392772818e6df6eb7261 @kuboon kuboon committed with toadkicker Sep 18, 2012
Showing with 12 additions and 0 deletions.
  1. +12 −0 app/helpers/glyph_helper.rb
@@ -0,0 +1,12 @@
+module GlyphHelper
+ # ==== Examples
+ # glyph(:share_alt)
+ # # => <i class="icon-share-alt"></i>
+ # glyph(:lock, :white)
+ # # => <i class="icon-lock icon-white"></i>
+
+ def glyph(*names)
+ content_tag :i, nil, class: names.map{|name| "icon-#{name.to_s.gsub('_','-')}" }
+ end
+end
+

0 comments on commit b222bda

Please sign in to comment.