1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-08-06 22:15:20 +02:00

fix: allow comma-separated currency input for budgeted_spending

This commit is contained in:
Mohan 2025-07-24 15:46:42 +05:30
parent b7c56e2fb7
commit 6cb58fbf05

View file

@ -37,7 +37,7 @@ class BudgetCategoriesController < ApplicationController
private
def budget_category_params
params.require(:budget_category).permit(:budgeted_spending).tap do |params|
params[:budgeted_spending] = params[:budgeted_spending].presence || 0
params[:budgeted_spending] = params[:budgeted_spending].to_s.delete(',').presence || 0
end
end