mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-31 21:37:16 +00:00
Preview shipping emails with tracking if present
This commit is contained in:
committed by
Mikhail Grigoriev
parent
fb2279d26d
commit
2e05210596
@@ -5,7 +5,10 @@ require 'open_food_network/scope_variant_to_hub'
|
||||
module Spree
|
||||
class ShipmentPreview < ActionMailer::Preview
|
||||
def shipped
|
||||
ShipmentMailer.shipped_email(Shipment.last)
|
||||
shipment =
|
||||
Shipment.where.not(tracking: [nil, ""]).last ||
|
||||
Shipment.last
|
||||
ShipmentMailer.shipped_email(shipment)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user