From 7f4a59d5d81b06d8917ea5711059613e389bf940 Mon Sep 17 00:00:00 2001 From: Alessandro Rodi Date: Tue, 5 May 2020 11:37:21 +0200 Subject: [PATCH 1/2] Fix error message on email preview Email preview had a wrong error message (typo) --- core/lib/spree/mailer_previews/carton_preview.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/spree/mailer_previews/carton_preview.rb b/core/lib/spree/mailer_previews/carton_preview.rb index 41c09f75477..a37565c08dd 100644 --- a/core/lib/spree/mailer_previews/carton_preview.rb +++ b/core/lib/spree/mailer_previews/carton_preview.rb @@ -5,7 +5,7 @@ class MailerPreviews class CartonPreview < ActionMailer::Preview def shipped carton = Carton.joins(:orders).last - raise "Your database needs at one shipped order with a carton to render this preview" unless carton + raise "Your database needs at least one shipped order with a carton to render this preview" unless carton Spree::Config.carton_shipped_email_class.shipped_email(order: carton.orders.first, carton: carton) end end From 1179d46ca3188239bc2ca355582f6a7354dce4d4 Mon Sep 17 00:00:00 2001 From: Alessandro Rodi Date: Tue, 5 May 2020 11:38:27 +0200 Subject: [PATCH 2/2] Update carton_preview.rb --- core/lib/spree/mailer_previews/carton_preview.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/core/lib/spree/mailer_previews/carton_preview.rb b/core/lib/spree/mailer_previews/carton_preview.rb index a37565c08dd..a1c4653a263 100644 --- a/core/lib/spree/mailer_previews/carton_preview.rb +++ b/core/lib/spree/mailer_previews/carton_preview.rb @@ -6,6 +6,7 @@ class CartonPreview < ActionMailer::Preview def shipped carton = Carton.joins(:orders).last raise "Your database needs at least one shipped order with a carton to render this preview" unless carton + Spree::Config.carton_shipped_email_class.shipped_email(order: carton.orders.first, carton: carton) end end