diff --git a/Procfile.dev b/Procfile.dev index d04ee87d..18f6d0df 100644 --- a/Procfile.dev +++ b/Procfile.dev @@ -1,3 +1,3 @@ -web: bin/rails server -b 0.0.0.0 +web: ${DEBUG:+rdbg -O -n -c --} bin/rails server -b 0.0.0.0 css: bin/rails tailwindcss:watch worker: bundle exec good_job start diff --git a/app/models/account/holding.rb b/app/models/account/holding.rb index 73dd8c02..34f6efe7 100644 --- a/app/models/account/holding.rb +++ b/app/models/account/holding.rb @@ -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 diff --git a/app/views/account/holdings/_holding.html.erb b/app/views/account/holdings/_holding.html.erb index 83f84254..19a0c52c 100644 --- a/app/views/account/holdings/_holding.html.erb +++ b/app/views/account/holdings/_holding.html.erb @@ -3,9 +3,11 @@ <%= turbo_frame_tag dom_id(holding) do %>