StrapOn

StrapOn provides full integration for Twitter's Bootstrap library in Rails. It includes the stylesheets, Javascript code, a form builder and block style helpers for the different Twitter components.

Installation

Add strap_on to your Gemfile

gem "strap_on"

And run bundle install.

Javascript and CSS

Javascript

To include all the Javascript files in your application, add the following line to your application.js:

//= require twitter_bootstrap

If you only want to include a single file, add this:

//= require twitter_bootstrap/[name]

Replace [name] with the name of the file you want to use (alerts, dropdowns, buttons, etc).

CSS

To include the Bootstrap styles to your application, add the following line to your application.css:

*= require twitter_bootstrap

Form Builder

HTML Helpers

Completeness

This implementation is currently not complete, right now there's support for:

  • Grid
  • Layouts
  • Type
  • Media
  • Some forms

We still need to add:

  • Helpers for tables
  • Some form fields
  • Navigation helpers
  • Alerts
  • Popovers

Issues

Some of the FormBuilder fields might conflict with existing form helpers like SimpleForm.

If you run into any errors please report them in the issues tracker.

Epilogue

Federico wrote this. You can contact me at [email protected] or in Twitter @febuiles.