Files
sure/app/views/investments/_form.html.erb
Duc-Thomas 7e912c1c93 Fix Investment account subtype not saving on creation (#1039)
* Add permitted_accountable_attributes for investments

* Include fields_for for accountable subtype selection
2026-02-23 17:47:49 -05:00

10 lines
509 B
Plaintext

<%# 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 %>
<% end %>