Thought of the Day::Bootstrap Helpers

If you hate having a bunch of html in your views as much as I do there is a gem that can help! The Bh gem provides some Bootstrap helpers that can clean up your code. Add the gem to your Gemfile (gem ‘bh’, ‘~> 1.2) and you are provided with the following helper methods:

alert_box

button_to, button,

dropdown,

font_awesome_css,

form_for,

icon,

modal,

navbar,

nav,

panel_row,

panel_bar

progress_bar

You can find more at their github page.

Here is an example of form_for:

You can add layout: :basic to your form and Bh takes care of the format and the labels.

C’est Fini.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.