mirror of
https://github.com/we-promise/sure.git
synced 2026-05-12 23:25:00 +00:00
fix: currency being ignored for properties (#1556)
* fix: add property with different currency is not updating * fix: add property with different currency test * fix: code review * fix: code review
This commit is contained in:
committed by
GitHub
parent
9b2c80768c
commit
c9f9e04071
@@ -62,8 +62,10 @@ module AccountableResource
|
||||
end
|
||||
end
|
||||
|
||||
# Update remaining account attributes
|
||||
update_params = account_params.except(:return_to, :balance, :currency, :opening_balance_date)
|
||||
# Update remaining account attributes. Note: currency is intentionally allowed
|
||||
# here so all account types (depositories, credit cards, loans, etc.) can
|
||||
# have their currency changed via this shared update path.
|
||||
update_params = account_params.except(:return_to, :balance, :opening_balance_date)
|
||||
unless @account.update(update_params)
|
||||
@error_message = @account.errors.full_messages.join(", ")
|
||||
render :edit, status: :unprocessable_entity
|
||||
|
||||
Reference in New Issue
Block a user