I am building a site where a user will ftp a bunch of media files to a
server(s). I have a process that runs against all those files and
creates a yml and sql file that can be used to import them into my ruby
on rails application running somewhere completely different.
If I use the sql file, it bypasses all my great validation code in the
model (no good)
I would like to import the yml file. I can see how to do that with
fixtures, but not sure how it will work.
Does not fixtures :items wipe out the exiting data in the table and
replace it with the stuff in items.yml? Is there a way to have it just
run through them and add them to the table. I suppose my next question
will be a way to have it ignore validation failures and keep going.
I suppose I could write code to crack open the file and read the
records but that seems very unDRY. Any pointers would be very much
appreciated.
Sincerely,
Mike