Add :checkout scope in Spree::Payment

This commit is contained in:
Ana Nunes da Silva
2023-02-05 17:04:05 +00:00
parent 1e3f754f96
commit 8bd890f311

View File

@@ -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)) }