Skip to content

Instantly share code, notes, and snippets.

@tylerlee
Created January 9, 2014 18:49
Show Gist options
  • Select an option

  • Save tylerlee/8339700 to your computer and use it in GitHub Desktop.

Select an option

Save tylerlee/8339700 to your computer and use it in GitHub Desktop.
The button is a little bit out of date, and the html_options are a bit contrived in their usefulness. However, this is how you use it:
<%= the_button 'Submit', url_options, html_options %>
html_options = size: specify 'small', if you want the button smaller
type: specify 'primary' if the button is the primary action on a page
icon: specify the name of an icon from the icon font
popup: 'data-popup-value'
The submit button is just a simplified version of the_button for submitting forms.
<%= the_submit_button 'Submit' %>
html_options = type: defaults to primary,
outer_class: specify a special class to add to a span wrapping the button itself
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment