Skip to content

Instantly share code, notes, and snippets.

@mariusbutuc
Created April 3, 2015 16:49
Show Gist options
  • Save mariusbutuc/b9727ed9222cddab38c0 to your computer and use it in GitHub Desktop.
Save mariusbutuc/b9727ed9222cddab38c0 to your computer and use it in GitHub Desktop.
Install simple_form with Bootstrap support (SLIM version)
clubhouse marius$ rails generate simple_form:install --bootstrap
create config/initializers/simple_form.rb
create config/initializers/simple_form_bootstrap.rb
exist config/locales
create config/locales/simple_form.en.yml
create lib/templates/slim/scaffold/_form.html.slim
===============================================================================
Be sure to have a copy of the Bootstrap stylesheet available on your
application, you can get it on http://getbootstrap.com/.
Inside your views, use the 'simple_form_for' with one of the Bootstrap form
classes, '.form-horizontal' or '.form-inline', as the following:
= simple_form_for(@user, html: { class: 'form-horizontal' }) do |form|
===============================================================================
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment