This gem gives you a rake task db:seed:dump
do create a db/seeds.rb
from your current database state.
The generated db/seeds.rb
will look this:
Product.create!([
{ category_id: 1, description: "Long Sleeve Shirt", name: "Long Sleeve Shirt" },
{ category_id: 3, description: "Plain White Tee Shirt", name: "Plain T-Shirt" }
])
User.create!([
{ password: "123456", username: "test_1" },
{ password: "234567", username: "test_2" }
])
Posted by Henning Koch to makandra dev (2016-05-06 07:39)