Files
sure/app/models/crypto.rb
LPW 64dc5c2fb8 Add tax treatment classification for investment accounts with international support (#693)
* Add tax treatment support for accounts, investments, and cryptos

* Replace hardcoded region labels with I18n translations

* Add I18n support for subtype labels with fallback to hardcoded values

* fixed schema

---------

Co-authored-by: luckyPipewrench <luckypipewrench@proton.me>
2026-01-18 17:29:02 +01:00

30 lines
505 B
Ruby

class Crypto < ApplicationRecord
include Accountable
# Crypto is taxable by default, but can be held in tax-advantaged accounts
# (e.g., self-directed IRA, though rare)
enum :tax_treatment, {
taxable: "taxable",
tax_deferred: "tax_deferred",
tax_exempt: "tax_exempt"
}, default: :taxable
class << self
def color
"#737373"
end
def classification
"asset"
end
def icon
"bitcoin"
end
def display_name
"Crypto"
end
end
end