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 user_amount
    return unless user
    errors.add(:amount, 'must be bigger than or equal to 20') unless amount && (amount >= 20)
  end
def user_amount return unless user errors . add ( :amount , 'must be bigger than or equal to 20' ) unless amount && ( amount >= 20 ) 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 .