Skip to content

Instantly share code, notes, and snippets.

@mgreenly
Created December 27, 2011 02:49
Show Gist options
  • Save mgreenly/1522584 to your computer and use it in GitHub Desktop.
Save mgreenly/1522584 to your computer and use it in GitHub Desktop.
rails form formatting for twitter bootstrap #1
<!-- without error -->
<div class="clearfix">
<label for="bar">Bar</label>
<div class="input">
<input id="foo_bar" name="foo[bar]" size="30" type="text">
</div>
</div>
<!-- with error -->
<div class="field">
<div class="field_with_errors">
<label for="foo_bar">Bar</label>
</div><br>
<div class="field_with_errors">
<input id="foo_bar" name="foo[bar]" size="30" value="" type="text">
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment