spree/spree — Issue #1156: NoMethodError in Spree::CheckoutController#update undefined method `to_d' for #<Spree::Shipment:0xb53f5240>
Author: berkes
Created: 2012-02-14 17:17:09+00:00
State: open

Probably related to #714, which was fixed by a4af6c28db

Shipping set to "Price Sack".

Error thrown:
```NoMethodError in Spree::CheckoutController#update
undefined method `to_d' for #```

Relevant stack trace:
```
activemodel (3.1.3) lib/active_model/attribute_methods.rb:385:in `method_missing'
activerecord (3.1.3) lib/active_record/attribute_methods.rb:60:in `method_missing'
spree_core (1.0.0) app/models/spree/calculator/price_sack.rb:16:in `compute'
spree_core (1.0.0) lib/spree/core/calculated_adjustments.rb:49:in `compute_amount'
spree_core (1.0.0) lib/spree/core/calculated_adjustments.rb:32:in `create_adjustment'
spree_core (1.0.0) app/models/spree/shipment.rb:144:in `ensure_correct_adjustment'
activesupport (3.1.3) lib/active_support/callbacks.rb:429:in `_run_save_callbacks'
```

Looks like PriceSack Calculator misses an "amount" method.