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 |crypto_form| %>
<%= crypto_form.select :subtype,
Crypto.subtype_options_for_select,
{ label: t("cryptos.form.subtype_label"), prompt: t("cryptos.form.subtype_prompt"), include_blank: t("cryptos.form.subtype_none") } %>
<%= crypto_form.select :tax_treatment,
Crypto.tax_treatments.keys.map { |k| [t("accounts.tax_treatments.#{k}"), k] },
{ label: t("cryptos.form.tax_treatment_label"), include_blank: false },
{} %>
<p class="text-xs text-secondary mt-1"><%= t("cryptos.form.tax_treatment_hint") %></p>
<% end %>
<% end %>