The best solution to keep files in database (Rails) -


i know best way save binary files 'in database'. of course on disk files, need 'link' them in db. great solutions?

use paperclip attach file model.

say have mortgage has document

class mortgage < activerecord::base   has_attached_file :document end 

later:

mortgage = mortgage.find(params[:id]) document = mortgage.document 

paperclip used images, works types of files. can store on s3 well.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -