mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-30 21:27:17 +00:00
The Zeitwerk autoloader requires class names and file names to match. In this case, the class had a Spree namespace without being in a spree folder. The preview couldn't be displayed. Now it can be displayed.
13 lines
320 B
Ruby
13 lines
320 B
Ruby
# frozen_string_literal: true
|
|
|
|
require 'open_food_network/scope_variant_to_hub'
|
|
|
|
class ShipmentPreview < ActionMailer::Preview
|
|
def shipped
|
|
shipment =
|
|
Spree::Shipment.where.not(tracking: [nil, ""]).last ||
|
|
Spree::Shipment.last
|
|
Spree::ShipmentMailer.shipped_email(shipment, delivery: true)
|
|
end
|
|
end
|