Skip to content

Instantly share code, notes, and snippets.

@andypike
Created February 7, 2012 22:52
Show Gist options
  • Save andypike/1762680 to your computer and use it in GitHub Desktop.
Save andypike/1762680 to your computer and use it in GitHub Desktop.
simple_form 2.0.0.rc improved api for twitter bootstrap
-# Instead of this simple_form 2.0.0.rc Twitter Bootstrap complication:
= form.input :savings, :label => "Your Savings:", :input_html => {:class => 'span2'}, :wrapper => :prepend do
%span.add-on= £
= form.input_field :savings
%p.help-block Enter the amount of money you have in your savings account
-# I'd like to do something like this (simpler)
= form.input :savings, :label => "Your Savings:", :class => 'span2', :prepend => '£', :hint => 'Enter the amount of money you have in your savings account'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment