app/models/payment.rb
# See: https://github.com/rails/rails/issues/31234#issuecomment-446629054
# Because of the open enum-state a payment needs to be able to be in (Mollie requirement),
# we're undefining #open before defining it with the enum.
github.com/rails/rails/issues/31234#issuecomment-446629054
Because of the open enum-state a payment needs to be able to be in (Mollie requirement),
we're undefining #open before defining it with the enum.
github . com / rails / rails / issues / 31234#issuecomment - 446629054 Because of the open enum - state a payment needs to be able to be in ( Mollie requirement ) we ' re undefining #open before defining it with the enum .
def process_complete_payment!
    return unless status_previously_was != 'paid' && status == 'paid'
    process_user! if user
    process_invoice! if invoice
  end
def process_complete_payment! return unless status_previously_was != 'paid' && status == 'paid' process_user! if user process_invoice! if invoice end
See: https://github.com/rails/rails/issues/31234#issuecomment-446629054
Because of the open enum-state a payment needs to be able to be in (Mollie requirement),
we're undefining #open before defining it with the enum.
See : https : // github . com / rails / rails / issues / 31234#issuecomment - 446629054 Because of the open enum - state a payment needs to be able to be in ( Mollie requirement ) we ' re undefining #open before defining it with the enum .