From 7e5e167215e81c599eabcd6870b0012cea502bc3 Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Thu, 27 Jul 2017 15:56:21 +0200 Subject: [PATCH] Create a mail method when inserting seed data --- lib/tasks/dev.rake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/tasks/dev.rake b/lib/tasks/dev.rake index db5c2bad0c..cbbdc9d66a 100644 --- a/lib/tasks/dev.rake +++ b/lib/tasks/dev.rake @@ -9,6 +9,13 @@ namespace :openfoodnetwork do require_relative '../../spec/support/spree/init' task_name = "openfoodnetwork:dev:load_sample_data" + # -- MailMethod + # TODO: Remove me when in Spree 2.0. See http://guides.spreecommerce.org/release_notes/spree_2_0_0.html#mailmethod-model-no-longer-exists + Spree::MailMethod.create!( + environment: Rails.env, + preferred_mails_from: 'spree@example.com' + ) + # -- Shipping / payment information unless Spree::Zone.find_by_name 'Australia' puts "[#{task_name}] Seeding shipping / payment information"