Sha256: 3192345d85bed7f3ccf9796b611c69c562da5cf1b8cec4d95f902656df9b8831

Contents?: true

Size: 399 Bytes

Versions: 67

Compression:

Stored size: 399 Bytes

Contents

Spree::Sample.load_sample('tax_categories')
Spree::Sample.load_sample('zones')

california = Spree::Zone.find_by!(name: 'California Tax')
clothing = Spree::TaxCategory.find_by!(name: 'Clothing')

Spree::TaxRate.where(
  name: 'California',
  zone: california,
  amount: 0.1,
  tax_category: clothing
).first_or_create! do |tax_rate|
  tax_rate.calculator = Spree::Calculator::DefaultTax.create!
end

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
spree_sample-4.10.1 db/samples/tax_rates.rb
spree_sample-4.10.0 db/samples/tax_rates.rb
spree_sample-4.9.0 db/samples/tax_rates.rb
spree_sample-4.8.3 db/samples/tax_rates.rb
spree_sample-4.8.2 db/samples/tax_rates.rb
spree_sample-4.7.3 db/samples/tax_rates.rb
spree_sample-4.6.6 db/samples/tax_rates.rb
spree_sample-4.5.5 db/samples/tax_rates.rb
spree_sample-4.1.15 db/samples/tax_rates.rb
spree_sample-4.2.7 db/samples/tax_rates.rb
spree_sample-4.3.3 db/samples/tax_rates.rb
spree_sample-4.4.1 db/samples/tax_rates.rb
spree_sample-4.5.4 db/samples/tax_rates.rb
spree_sample-4.6.5 db/samples/tax_rates.rb
spree_sample-4.7.1 db/samples/tax_rates.rb
spree_sample-4.6.4 db/samples/tax_rates.rb
spree_sample-4.7.0 db/samples/tax_rates.rb
spree_sample-4.6.3 db/samples/tax_rates.rb
spree_sample-4.6.2 db/samples/tax_rates.rb
spree_sample-4.6.1 db/samples/tax_rates.rb