Module: BootstrapIconHelper

Defined in:
app/helpers/bootstrap_icon_helper.rb

Overview

RAILS BOOTSTRAP ENGINE

Bootstrap Icons twitter.github.com/bootstrap/base-css.html#icons

Copyright 2012-2013 Luiz Eduardo de Oliveira Fonseca, Agência Orangeweb

Licensed under The MIT License

opensource.org/licenses/MIT

Instance Method Summary collapse

Instance Method Details

#glyphicon(ico) ⇒ Object

Generates bootstrap glyphicon markup

<i class=“glyphicons-name”></i>



27
28
29
30
31
# File 'app/helpers/bootstrap_icon_helper.rb', line 27

def glyphicon(ico)
  	icon = ico.to_s
  	icon.gsub!(/_/, "-")
  	raw( :i, "", :class => "glyphicons-#{icon}")
end

#icon(ico) ⇒ Object

Generates bootstrap glyphicon markup

<i class=“icon-name”></i>



43
44
45
46
47
# File 'app/helpers/bootstrap_icon_helper.rb', line 43

def icon(ico)
	icon = ico.to_s
	icon.gsub!(/_/, "-")
	raw( :i, "", :class => "icon-#{icon}")
end