- Add the bootstrap-sass gem in the gemfile.
gem 'bootstrap-sass', '~> 3.3', '>= 3.3.6'
. For the latest version, check out rubygems bootstrap sass page - Run
bundle install
- Generate scaffold
rails g scaffold todos title:string description:text completed:boolean
- Migrate
rails db:migrate
- Link Bootstrap's
css
andjs
files from Rails' defaultcss
andjs
files. Editapp/assets/stylesheets/todos.scss
to include bootstrap by adding@import "bootstrap";
. Editapp/assets/javascripts/application.js
to include bootstrap by adding//= require bootstrap