Book Image

Bootstrap for Rails

By : Syed F Rahman
Book Image

Bootstrap for Rails

By: Syed F Rahman

Overview of this book

Table of Contents (18 chapters)
Bootstrap for Rails
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Implementing Bootstrap's grid system in a Rails application


It's time to finally use the Grid system in our Rails application. As stated earlier, we will create an application called Online Packt Shopping. We will use grid system in this chapter and create a CRUD app for products. We will continue developing this app throughout this book as we learn Bootstrap's different features.

So, let's proceed and create a Rails application called Online Packt Shopping.

rails new OnlinePacktShopping

Once the application is created, you should navigate inside the newly created folder and start the Rails server to test if the application is properly installed. So, let's do it using the following command:

cd /OnlinePacktShopping
rails server

Access the webpage at http://localhost:3000. It should show the default Rails app Welcome Board.

Our product will have the following four attributes:

  • Name

  • Featured Image

  • Description

  • Price

So, let's scaffold accordingly

Now, we will scaffold and generate a product model with...