mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-07-19 13:19:39 +02:00
* Add nice formatting for subtypes on account list * Fix rubocop linting errors * Implement better mapping * Fix rubocop linting * Add short and long versions of subtypes * Simplify subtype reference Co-authored-by: Zach Gollwitzer <zach.gollwitzer@gmail.com> Signed-off-by: Alex Hatzenbuhler <hatz@hey.com> * Simplify reference logic, add a small test * Fix test * Fix tests --------- Signed-off-by: Alex Hatzenbuhler <hatz@hey.com> Co-authored-by: Zach Gollwitzer <zach.gollwitzer@gmail.com>
26 lines
393 B
Ruby
26 lines
393 B
Ruby
class Depository < ApplicationRecord
|
|
include Accountable
|
|
|
|
SUBTYPES = {
|
|
"checking" => { short: "Checking", long: "Checking" },
|
|
"savings" => { short: "Savings", long: "Savings" }
|
|
}.freeze
|
|
|
|
class << self
|
|
def display_name
|
|
"Cash"
|
|
end
|
|
|
|
def color
|
|
"#875BF7"
|
|
end
|
|
|
|
def classification
|
|
"asset"
|
|
end
|
|
|
|
def icon
|
|
"landmark"
|
|
end
|
|
end
|
|
end
|