Skip to content

Commit

Permalink
Replace deprecated update_attributes with update method.
Browse files Browse the repository at this point in the history
  • Loading branch information
Oldharlem committed Aug 8, 2021
1 parent d46ba2c commit 205b9fb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/spree/mollie/payment_state_updater.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def update
else
MollieLogger.debug("Unhandled Mollie payment state received: #{@mollie_order.status}. Therefore we did not update the payment state.")
unless @spree_payment.order.paid_or_authorized?
@spree_payment.order.update_attributes(state: 'payment', completed_at: nil)
@spree_payment.order.update(state: 'payment', completed_at: nil)
end
end

Expand Down Expand Up @@ -69,7 +69,7 @@ def transition_to_shipping!
def complete_order!
return if @spree_payment.order.completed?
@spree_payment.order.finalize!
@spree_payment.order.update_attributes(state: 'complete', completed_at: Time.now)
@spree_payment.order.update(state: 'complete', completed_at: Time.now)
MollieLogger.debug('Order will be finalized and order confirmation will be sent.')
end
end
Expand Down

0 comments on commit 205b9fb

Please sign in to comment.