...

/

Feed the Database

Feed the Database

Learn how to add data to the database so that we can check our functions later.

We'll cover the following...

Let’s fill the database with dummy data before continuing with more code. With the file db/seeds.rb, Rails gives us a way to easily and quickly provide default values for a new installation. It’s a simple Ruby file that offers full access to all classes and methods of the application so that we don’t need to enter everything manually with the Rails console. We can use the db/seeds.rb with the rake ...