I am using refile gem to upload documents. Documents once uploaded are then sent to some recipients by email.
1) How can I add to mail as attachments the documents stored with refile ? below it is not working
I have the following in DB:
commented_id, varchar
commented_filename, varchar
commented_size, varchar
commented_content_type, varchar
attach files:
@revisions.each do |revision|
mail.attachments["#{revision.file_filename}"] = File.read(revision.file)
end
error: no implicit conversion of Refile::File into String
2) Can I change dynamically location of store files?