Class: Qe::Notifier
- Inherits:
-
ActionMailer::Base
- Object
- ActionMailer::Base
- Qe::Notifier
- Defined in:
- app/models/qe/notifier.rb
Instance Method Summary collapse
-
#notification(p_recipients, p_from, template_name, template_params = {}, options = {}) ⇒ Object
call Notifier.deliver_notification.
Instance Method Details
#notification(p_recipients, p_from, template_name, template_params = {}, options = {}) ⇒ Object
call Notifier.deliver_notification
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/models/qe/notifier.rb', line 5 def notification(p_recipients, p_from, template_name, template_params = {}, = {}) email_template = EmailTemplate.find_by_name(template_name) if email_template.nil? raise "Email Template #{template_name} could not be found" else @recipients = p_recipients @from = p_from @subject = Liquid::Template.parse(email_template.subject).render(template_params) @body = Liquid::Template.parse(email_template.content).render(template_params) end end |