I have tried scouring the mighty google, but can't seem to find what I am looking for (probably because what I am wanting to do is stupid)
But, is there a way to create a seed file from just a single database table instead of dumping the entire database contents?
Essentially, I have a Products table and I am just wanting to generate a seed file from this table.
Found what I was looking for using this Rails Gem https://github.com/rhalff/seed_dump
Use this Code:
rake db:seed:dump MODELS=User
Obviously replace User with the model name you are wanting to work with, or a comma separated list of models.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With