akkounts/app/models/donation.rb
Sebastian Kippe 5e2d5c3b28
All checks were successful
continuous-integration/drone/push Build is passing
Add paid_at date to donations
2020-12-19 13:28:47 +01:00

14 lines
240 B
Ruby

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