Last active
July 10, 2018 12:29
-
-
Save nirname/c56083d9852fdef79bd1e8999c44ccd8 to your computer and use it in GitHub Desktop.
Send email through ApplicationMailer with file attachments from ActiveStorage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
response.docs.each_with_index do |doc, i| | |
attachments[doc.filename.to_s] = {:mime_type => doc.blob.content_type, :content => doc.blob.download } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment