akkounts/app/models/donation.rb
Râu Cao f050d010fd
All checks were successful
continuous-integration/drone/push Build is passing
Refactor admin donation pages, fix errors
Not sending the right response codes for Turbo to handle.
2023-03-15 15:24:00 +07:00

16 lines
303 B
Ruby

class Donation < ApplicationRecord
# Relations
belongs_to :user
# Validations
validates_presence_of :user
validates_presence_of :amount_sats
validates_presence_of :paid_at
# Hooks
# TODO before_create :store_fiat_value
#Scopes
scope :completed, -> { where.not(paid_at: nil) }
end