From 8bd890f31187c87259a42258ae6ce19cf167df13 Mon Sep 17 00:00:00 2001 From: Ana Nunes da Silva Date: Sun, 5 Feb 2023 17:04:05 +0000 Subject: [PATCH] Add :checkout scope in Spree::Payment --- app/models/spree/payment.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/spree/payment.rb b/app/models/spree/payment.rb index 4d61396129..3d6e59ea36 100644 --- a/app/models/spree/payment.rb +++ b/app/models/spree/payment.rb @@ -47,6 +47,7 @@ module Spree scope :with_state, ->(s) { where(state: s.to_s) } scope :completed, -> { with_state('completed') } scope :incomplete, -> { where(state: %w(checkout pending requires_authorization)) } + scope :checkout, -> { with_state('checkout') } scope :pending, -> { with_state('pending') } scope :failed, -> { with_state('failed') } scope :valid, -> { where.not(state: %w(failed invalid)) }