Module: EmailHelper

Defined in:
app/helpers/email_helper.rb

Instance Method Summary collapse

Instance Method Details

#email_image_tag(image) ⇒ Object



2
3
4
5
6
# File 'app/helpers/email_helper.rb', line 2

def email_image_tag(image, **)
  image_underscore = image.tr("-", "_")
  attachments.inline[image_underscore] = File.read(Rails.root.join("app/assets/images/#{image}"))
  image_tag(attachments.inline[image_underscore].url, **)
end