Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

enhancements

  • Loading branch information...
commit 1de00a753e5ba26054b51880047c44cfb7284998 1 parent a3a9466
@mcanato authored
View
2  lib/twitter-bootstrap-markup-rails/components/button.rb
@@ -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
View
8 lib/twitter-bootstrap-markup-rails/helpers/button_helpers.rb
@@ -10,7 +10,7 @@ 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
@@ -18,7 +18,7 @@ module ButtonHelpers
#
# 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,7 +62,7 @@ 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
@@ -70,7 +70,7 @@ def bootstrap_button_dropdown(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
Please sign in to comment.
Something went wrong with that request. Please try again.