5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-25 00:16:21 +00:00
panel/app/mailers/application_mailer.rb

21 lines
379 B
Ruby
Raw Permalink Normal View History

2019-03-26 15:32:20 +00:00
# frozen_string_literal: true
2019-07-26 00:36:33 +00:00
# Configuración base del correo
2018-01-02 17:19:25 +00:00
class ApplicationMailer < ActionMailer::Base
2019-07-26 00:36:33 +00:00
helper :application
before_action :inline_logo!
2018-01-02 17:19:25 +00:00
layout 'mailer'
2019-07-26 00:36:33 +00:00
private
2020-05-30 19:43:25 +00:00
def site
@site ||= @params[:site]
2020-05-30 19:43:25 +00:00
end
2019-07-26 00:36:33 +00:00
def inline_logo!
attachments.inline['logo.png'] ||=
2019-10-14 15:31:38 +00:00
File.read(Rails.root.join('app', 'assets', 'images', 'logo.png'))
2019-07-26 00:36:33 +00:00
end
2018-01-02 17:19:25 +00:00
end