CarrierWave
Classier solution for file uploads for Rails, Sinatra and others
... and get going. Make sure you are loading CarrierWave after loading your ORM, otherwise you'll need to require the relevant extension manually. Now you can cache files by assigning them to the attribute, they will automatically be stored when the record is saved. CarrierWave also has convenient support for multiple file upload fields. Add a column which can store an array. This could be an array column or a JSON column for example. Your choice depends on what your database supports.