Sha256: 35b7d5785d8257bcb26343765bcbbc55bbbcf7d11c2eafb7c0f750c50c3fc370
Contents?: true
Size: 491 Bytes
Versions: 9
Compression:
Stored size: 491 Bytes
Contents
module Effective class LiquidMailer < ::ActionMailer::Base def mail(headers = {}, &block) # this be dangerous and requires ruby 2.0+ mail_method = caller_locations(1, 1)[0].label options = EffectiveEmailTemplates.get(mail_method).mail_options if options[:subject].present? options[:subject] = Liquid::Template.parse(options[:subject]).render(@to_liquid) rescue options[:subject] end super(headers.merge(options), &block) end end end
Version data entries
9 entries across 9 versions & 1 rubygems