Create a mail method when inserting seed data

This commit is contained in:
Pau Perez
2017-07-27 15:56:21 +02:00
committed by Rob Harrington
parent 665acdef8f
commit 7e5e167215

View File

@@ -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"