mirror of
https://github.com/maybe-finance/maybe.git
synced 2025-08-02 20:15:22 +02:00
Fix holding name error (#1113)
* Add optional debugger to bin/dev script * Fix holding naming
This commit is contained in:
parent
37ae51f68a
commit
4433488562
3 changed files with 9 additions and 4 deletions
|
@ -14,9 +14,12 @@ class Account::Holding < ApplicationRecord
|
|||
scope :known_value, -> { where.not(amount: nil) }
|
||||
scope :for, ->(security) { where(security_id: security).order(:date) }
|
||||
|
||||
delegate :name, to: :security
|
||||
delegate :ticker, to: :security
|
||||
|
||||
def name
|
||||
security.name || ticker
|
||||
end
|
||||
|
||||
def weight
|
||||
return nil unless amount
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue