From ff83912a7ac0cfb45a09f5a1e6ee63bef8da59e2 Mon Sep 17 00:00:00 2001 From: Joshua Pinter Date: Wed, 28 Mar 2012 14:11:42 -0600 Subject: [PATCH] Added class option to icon_tag to accept any custom classes you want to throw at it. --- bootstrap_helper.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bootstrap_helper.rb b/bootstrap_helper.rb index f63e4b8..a704ad2 100644 --- a/bootstrap_helper.rb +++ b/bootstrap_helper.rb @@ -20,7 +20,9 @@ module RailsBootstrapHelpers::BootstrapHelper # with 'icon-' if not done already. # @param [Hash] options # - # @option options [Boolean] white (false) Set to false if you want to use the black icon. + # @option options [Boolean] white (false) Set to true if you want a white icon. + # @option options [String] class ('') Set any classes you want for the icon here. + # a bit nicer. # # @return [HTML] # @@ -33,6 +35,7 @@ def icon_tag name, options = {} klass = [name] klass << 'icon-white' if options[:white] + klass << options[:class] content_tag :i, nil, class: klass.join( ' ' ) end