Class: Spree::CartonMailer
- Inherits:
-
BaseMailer
- Object
- ActionMailer::Base
- BaseMailer
- Spree::CartonMailer
- Defined in:
- app/mailers/spree/carton_mailer.rb
Instance Method Summary collapse
-
#shipped_email(options) ⇒ Mail::Message
Send an email to customers to notify that an individual carton has been shipped.
Methods inherited from BaseMailer
#bcc_address, #from_address, #mail, #money
Instance Method Details
#shipped_email(options) ⇒ Mail::Message
Send an email to customers to notify that an individual carton has been shipped. If a carton contains items from multiple orders then this will be called with that carton one time for each order.
14 15 16 17 18 19 20 21 22 23 |
# File 'app/mailers/spree/carton_mailer.rb', line 14 def shipped_email() @order = .fetch(:order) @carton = .fetch(:carton) @manifest = @carton.manifest_for_order(@order) = { resend: false }.merge() @store = @order.store subject = ([:resend] ? "[#{t('spree.resend').upcase}] " : '') subject += "#{@store.name} #{t('spree.shipment_mailer.shipped_email.subject')} ##{@order.number}" mail(to: @order.email, from: from_address(@store), subject: subject) end |