Module: SpecialDelivery::Mailer
- Defined in:
- lib/special_delivery/mailer.rb
Instance Method Summary collapse
Instance Method Details
#special_delivery(params = {}) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/special_delivery/mailer.rb', line 3 def special_delivery(params = {}) callback_class = params[:callback_class] yield.tap do |mail| if mail && callback_class Delivery.new.tap do |delivery| delivery.callback_class_name = callback_class.to_s delivery.deliverable = params[:callback_record] if params[:callback_record] delivery. = (mail) end.save end end end |