mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 21:29:38 +02:00
* Remove balance mode, sketch out refactor * Activity view checkpoint * Entry partials, checkpoint * Finish txn partial * Give entries context when editing for different turbo responses * Calculate change of balance for each entry * Account tabs consolidation * Translations, linting, brakeman updates * Account actions concern * Finalize forms, get account system tests passing * Get tests passing * Lint, rubocop, schema updates * Improve routing and stream responses * Fix broken routes * Add import option for adding accounts * Fix system test * Fix test specificity * Fix sparklines * Improve account redirects
23 lines
444 B
Ruby
23 lines
444 B
Ruby
class CreditCard < ApplicationRecord
|
|
include Accountable
|
|
|
|
def available_credit_money
|
|
available_credit ? Money.new(available_credit, account.currency) : nil
|
|
end
|
|
|
|
def minimum_payment_money
|
|
minimum_payment ? Money.new(minimum_payment, account.currency) : nil
|
|
end
|
|
|
|
def annual_fee_money
|
|
annual_fee ? Money.new(annual_fee, account.currency) : nil
|
|
end
|
|
|
|
def color
|
|
"#F13636"
|
|
end
|
|
|
|
def icon
|
|
"credit-card"
|
|
end
|
|
end
|