Skip to content

Commit

Permalink
Remove unhelpful preload in Stock::Estimator
Browse files Browse the repository at this point in the history
These included records aren't being used by the taxation classes, which
do their own querying.
  • Loading branch information
jhawthorn committed Sep 7, 2017
1 parent 38f456c commit 5f31277
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/app/models/spree/stock/estimator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def calculate_shipping_rates(package)
def shipping_methods(package)
package.shipping_methods
.available_for_address(package.shipment.order.ship_address)
.includes(:calculator, tax_category: :tax_rates)
.includes(:calculator)
.to_a
.select do |ship_method|
calculator = ship_method.calculator
Expand Down

0 comments on commit 5f31277

Please sign in to comment.