I've been looking for a week now. I'm using Rails 3.
I have a document section in my app and I'd like to populate the database with fake data. So far it was super easy: just add a .yml file in the Fixture folder and that's it.
Now what I'd like is to have a fixture file (.yml) that would populate the DB with documents when I rake db:fixtures:load
. I just don't know how to achieve this. I've been looking to the fixture_file_upload
function but I don't think it's the way to go.
Any idea? Thanks in advance.
Edit: to be perfectly clear, I'd like to upload a document that I list in my Document fixture. So when I rake db:fixtures:load
, the document is actually uploaded.