The personal finance app for everyone (by everyone)
Ruby
<%# locals: (account:, url:) %>
<%= render "accounts/form", account: account, url: url do |form| %>
<%= form.fields_for :accountable do |investment_form| %>
<%= investment_form.select :subtype,
grouped_options_for_select(Investment.subtypes_grouped_for_select(currency: Current.family.currency), account.accountable.subtype),
{ label: true, prompt: t("investments.form.subtype_prompt"), include_blank: t("investments.form.none") } %>
<% end %>
<% sharesight_account = account.provider_account_for("SharesightAccount") if account.persisted? %>
<% if sharesight_account %>
<%= render "sharesight_accounts/settings_fields", form: form, sharesight_account: sharesight_account, account: account %>
<% end %>
<% end %>