How do I use a YAML file instead of seeds.rb to load the initial data into a database?
How do I use a YAML file instead of seeds.rb to load the initial data into a database?
I built this script to handle exactly this issue, while keeping seeds yaml files separate to tests.
It has namespace support, and will automatically find records when you supply just an id
https://gist.github.com/x9sim9/78405f13b698b87ab7b234ea793399ca