I have this in the mailer:
attachments.inline["logo.png"] = File.read("#{Rails.root}/app/assets/images/logo.png")
And in the email template I have this:
<%= image_tag attachments['logo.png'].url %>
It works just fine and the logo does appear in the email.
Now this is the weird part, I have another image that is not in the asset pipeline but stored in the database and also a loop of other images stored in the database. And none of them appear in the email. The email goes through without any errors. Any idea what might be wrong and how I can debug this?
<%= image_tag @account.image.thumb.url %>
<% @attachments.each do |attachment| %>
<%= image_tag attachment.images.thumb.url %>
<% end %>
I'm using the gem carrierwave to attach image and I uploading this version:
version :thumb do
process resize_to_fill: [1024, 768]
end