diff --git a/lib/spree/shipment_notice.rb b/lib/spree/shipment_notice.rb index 2dbc0bd..570026d 100644 --- a/lib/spree/shipment_notice.rb +++ b/lib/spree/shipment_notice.rb @@ -17,7 +17,7 @@ def apply def locate if Spree::Config.shipstation_number == :order order = Spree::Order.find_by_number(@number) - @shipment = order.try(:shipment) + @shipment = order.try(:shipments).try(:first) else @shipment = Spree::Shipment.find_by_number(@number) end @@ -27,9 +27,10 @@ def update @shipment.update_attribute(:tracking, @tracking) unless @shipment.shipped? - @shipment.reload.update_attribute(:state, 'shipped') - @shipment.inventory_units.each &:ship! - @shipment.touch :shipped_at + @shipment.reload.ship! + # @shipment.reload.update_attribute(:state, 'shipped') + # @shipment.inventory_units.each &:ship! + # @shipment.touch :shipped_at end true diff --git a/spree_shipstation.gemspec b/spree_shipstation.gemspec index 21ca95d..298b76c 100644 --- a/spree_shipstation.gemspec +++ b/spree_shipstation.gemspec @@ -16,7 +16,7 @@ Gem::Specification.new do |s| s.require_path = 'lib' s.requirements << 'none' - s.add_dependency 'spree_core', '~> 2.0' + s.add_dependency 'spree_core', '~> 2.4.0.beta' s.add_development_dependency 'capybara', '~> 1.1.2' s.add_development_dependency 'coffee-rails'