Module: RailsBootstrapHelpers::Helpers::BaseHelper
- Defined in:
- lib/rails-bootstrap-helpers/helpers/base_helper.rb
Class Method Summary collapse
-
.icon(icon, options = {}) ⇒ Object
Renders the given icon.
Instance Method Summary collapse
-
#icon(icon, options = {}) ⇒ Object
Renders the given icon.
Class Method Details
.icon(icon, options = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 |
# File 'lib/rails-bootstrap-helpers/helpers/base_helper.rb', line 10 def self.icon (icon, = {}) icon = ERB::Util.html_escape(icon.to_s) cls = "icon-" + icon if invert = .delete(:invert) cls << " icon-white" end "<i class=\"#{cls}\"></i>".html_safe end |
Instance Method Details
#icon(icon, options = {}) ⇒ Object
29 30 31 |
# File 'lib/rails-bootstrap-helpers/helpers/base_helper.rb', line 29 def icon (icon, = {}) RailsBootstrapHelpers::Helpers::BaseHelper.icon(icon, ) end |