From 5b02150e12b00f6e1a99b2c848884965a58e9f86 Mon Sep 17 00:00:00 2001 From: Ariel Kirkwood Date: Sun, 5 May 2024 18:35:36 -0400 Subject: [PATCH] Display fund's type and sector --- app/models/fund.rb | 2 +- app/views/funds/_fund.html.erb | 9 +++++++-- lib/holdings/extraction_strategies/tcw.rb | 11 +++++++++-- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/app/models/fund.rb b/app/models/fund.rb index 4c550e8..aaad4e4 100644 --- a/app/models/fund.rb +++ b/app/models/fund.rb @@ -14,7 +14,7 @@ class Fund < ApplicationRecord has_many :assets, through: :holdings delegate :extract_holdings, to: :holdings_extractor - delegate :name, to: :underlying_asset + delegate :name, :type, :sector, to: :underlying_asset validates :underlying_asset_id, uniqueness: true diff --git a/app/views/funds/_fund.html.erb b/app/views/funds/_fund.html.erb index 241d80a..cb5a2a4 100644 --- a/app/views/funds/_fund.html.erb +++ b/app/views/funds/_fund.html.erb @@ -1,6 +1,13 @@
<%= render @ticker %>
<%= tag.h1 fund.name %> +
+ <%= tag.strong fund.type.underscore.humanize %> + <%= tag.strong fund.sector %> +
+ +
+ <%= tag.blockquote class: 'blockquote' do %>