Sha256: c9690788448d03dbaef3a4a4d38b3595e72349a708de944bc122868eb89015a0
Contents?: true
Size: 623 Bytes
Versions: 17
Compression:
Stored size: 623 Bytes
Contents
class OrderMailer < ActionMailer::Base layout "mail" def confirmation_for(order) @order = order @person = order.person options = Hash.new.tap do |o| o[:to] = @person.email o[:from] = from(@order) o[:subject] = "Your Order" if order.contact_email.present? o[:reply_to] = order.contact_email end end mail(options) end private def from(order) if ARTFULLY_CONFIG[:contact_email].present? ARTFULLY_CONFIG[:contact_email] elsif order.contact_email.present? order.contact_email else order.organization.email end end end
Version data entries
17 entries across 17 versions & 1 rubygems