Skip to content
This repository was archived by the owner on Jul 25, 2025. It is now read-only.

Commit 188544b

Browse files
Shpigfordclaude
andcommitted
Fix interest rate validation error in early mortgage payoff calculator
Use tool.interest_rate instead of tool.mortgage_rate_30 to prevent exceeding the 100% maximum validation constraint. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 913d9d1 commit 188544b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/views/tools/widgets/forms/_early_mortgage_payoff_calculator.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<%= form.unit_field :years_left, label: "Years left on loan", value: tool.years_left, label_right: "years", data: { controller: "autonumeric", autonumeric_options_value: { decimalPlaces: 0 }, auto_submit_form_target: "auto" } %>
1111
</div>
1212
<div class="flex flex-col gap-2">
13-
<%= form.unit_field :interest_rate, label: "Interest rate", value: tool.mortgage_rate_30, label_right: "%", data: { controller: "autonumeric", autonumeric_options_value: { decimalPlaces: 2 }, auto_submit_form_target: "auto" } %>
13+
<%= form.unit_field :interest_rate, label: "Interest rate", value: tool.interest_rate * 100, label_right: "%", data: { controller: "autonumeric", autonumeric_options_value: { decimalPlaces: 2 }, auto_submit_form_target: "auto" } %>
1414
</div>
1515
<div data-controller="synchronized-input" class="flex flex-col gap-2">
1616
<%= form.unit_field :extra_payment, label: "Extra monthly payment", value: tool.extra_payment, unit_symbol: "$", data: { controller: "autonumeric", synchronized_input_target: "input", action: "synchronized-input#syncValue input->auto-submit-form#submit", auto_submit_form_target: "auto", autosubmit_trigger_event: "input-sync" } %>

0 commit comments

Comments
 (0)