Permalink
Browse files

enhancements

  • Loading branch information...
mcanato committed Jul 19, 2012
1 parent a3a9466 commit 1de00a753e5ba26054b51880047c44cfb7284998
@@ -46,7 +46,7 @@ def build_class
end
def build_icon
- if (options[:icon_white] || options[:type].blank?)
+ if (options[:icon_white] || options[:type].present?)
options[:icon_white] = true
end
Icon.new(:name => options[:icon_name], :icon_white => options[:icon_white]).to_s
@@ -10,15 +10,15 @@ module ButtonHelpers
# :type - Additional button type(s). For one, just specify a string, but
# you can also pass an array (of sym or str) for multiple classes
# :disabled - Will disable the button if set to true
- # :icon - Specify an icon class from bootstrap to prepend
+ # :icon_nanme - Specify an icon name from bootstrap to prepend
# :icon_white - Specify true if you want the icon to be white
# :id - Assign an ID to the button
# :html_options - Any additional options you'd like to pass to the content_tag that will be created
# for this button's a tag (for instance :target can be specified in :html_options).
#
# Examples
#
- # bootstrap_button 'Search', '#', :type => 'btn-primary', :icon => 'icon-search'
+ # bootstrap_button 'Search', '#', :type => 'primary', :icon => 'search'
#
def bootstrap_button(text, link, options = {})
Twitter::Bootstrap::Markup::Rails::Components::Button.new(
@@ -62,15 +62,15 @@ def bootstrap_button_dropdown(options = {})
# :type - Additional button type(s). For one, just specify a string, but
# you can also pass an array (of sym or str) for multiple classes
# :disabled - Will disable the button if set to true
- # :icon - Specify an icon class from bootstrap to prepend
+ # :icon_nanme - Specify an icon name from bootstrap to prepend
# :icon_white - Specify true if you want the icon to be white
# :id - Assign an ID to the button
# :html_options - Any additional options you'd like to pass to the content_tag that will be created
# for this button's a tag (for instance :target can be specified in :html_options).
#
# Examples
#
- # bootstrap_link_to 'Search', '#', :type => 'btn-primary', :icon => 'icon-search'
+ # bootstrap_link_to 'Search', '#', :type => 'primary', :icon => 'search'
#
def bootstrap_link_to(text, link, options = {})
options[:class] = nil

0 comments on commit 1de00a7

Please sign in to comment.