Sha256: d8b9aee5fdd21f0d6ad4e20b6615c136a9a0cbd346f26439b06aa8d3e21c068d
Contents?: true
Size: 607 Bytes
Versions: 2
Compression:
Stored size: 607 Bytes
Contents
class AddWinkelstraatPaymentMethodAndShippingMethod < ActiveRecord::Migration def change Spree::PaymentMethod.find_or_create_by(name: 'Paid at winkelstraat', display_on: :back_end, type: 'Spree::PaymentMethod::Check', active: true) sm = Spree::ShippingMethod.find_or_create_by(name: 'Shipped by winkelstraat', display_on: :back_end, admin_name: 'Winkelstraat shipping') sm.zones = Spree::Zone.all sm.shipping_categories = [Spree::ShippingCategory.first] sm.calculator = Spree::Calculator::Shipping::FlatRate.create(calculable: sm) unless sm.calculator.present? sm.save! end end
Version data entries
2 entries across 2 versions & 1 rubygems