1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-03 04:25:21 +02:00

Fix transfers and form currencies (#1477)
Some checks are pending
Publish Docker image / ci (push) Waiting to run
Publish Docker image / Build docker image (push) Blocked by required conditions

This commit is contained in:
Zach Gollwitzer 2024-11-18 15:50:47 -05:00 committed by GitHub
parent fcb95207d7
commit 81d604f3d4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 41 additions and 19 deletions

View file

@ -1,6 +1,8 @@
<%# locals: (form:, amount_method:, currency_method:, **options) %>
<% currency_value = if form.object && form.object.respond_to?(currency_method)
<% currency_value = if options[:currency_value_override].present?
options[:currency_value_override]
elsif form.object && form.object.respond_to?(currency_method)
form.object.public_send(currency_method)
end
currency = Money::Currency.new(currency_value || options[:default_currency] || "USD") %>
@ -44,7 +46,7 @@
<div>
<%= form.select currency_method,
currencies_for_select.map(&:iso_code),
{ inline: true },
{ inline: true, selected: currency_value },
{
class: "w-fit pr-5 disabled:text-gray-400 form-field__input",
disabled: options[:disable_currency],