Reputation: 3548
I have a rails 3 application that involves a lot of importing of CSV files from a third party into various rails models. I have developed some scripts to perform most of the heavy lifting and today I added a lot of validation to the models to make sure valid data is going into the models/tables.
I'd also like to do some logging of validation errors so I can stay on top of all of the data processing and catch and correct validation errors quickly. To that end, I have taken the following steps:
Question(s): Is my proposed approach to capturing validation error reasonable. Are there approaches that have been used by others that may be better/preferable to what I propose. Is anyone aware of any gems or built-in functionality that would accomplish what I'm trying to do.
Upvotes: 1
Views: 525
Reputation: 774
have also a look at this :)
Importing CSV file into multiple models at one time
and rail_admin_import gem, maybe you can expand with above staging table approach.
Upvotes: 1
Reputation: 29369
Have a look at validation_rage gem. you might be able to use that gem to achieve what you want.
Upvotes: 1