diff --git a/README.markdown b/README.markdown index 83b9bc189b..dc7c009fe3 100644 --- a/README.markdown +++ b/README.markdown @@ -44,6 +44,10 @@ Create the development and test databases, using the settings specified in `conf rake db:schema:load db:seed +Load some default data for your environment + + rake openfoodweb:dev:load_sample_data + At long last, your dreams of spinning up a development server can be realised: rails server diff --git a/lib/tasks/dev.rake b/lib/tasks/dev.rake index 576fe8fca9..bb53266596 100644 --- a/lib/tasks/dev.rake +++ b/lib/tasks/dev.rake @@ -30,7 +30,6 @@ namespace :openfoodweb do end end - # -- Enterprises unless Enterprise.count > 0 puts "[db:seed] Seeding enterprises" @@ -39,6 +38,9 @@ namespace :openfoodweb do 3.times { FactoryGirl.create(:distributor_enterprise) } end + unless Spree::ShippingMethod.all.any? { |sm| sm.calculator.is_a? OpenFoodWeb::Calculator::Itemwise } + FactoryGirl.create(:itemwise_shipping_method) + end # -- Products unless Spree::Product.count > 0