mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 12:04:08 +00:00
Prepare fixture data for account sync tests (#493)
* Rename account balance field for clarity `original_balance` and `original_currency` may infer that these values are "original" to the account. In reality, they represent the "current" balance and currency on the account. * Prepare fixture data for account sync testing * Update to new field * Fix conflicts * Remove local schema change
This commit is contained in:
@@ -3,7 +3,7 @@ class AccountsController < ApplicationController
|
||||
|
||||
def new
|
||||
@account = Account.new(
|
||||
original_balance: nil,
|
||||
balance: nil,
|
||||
accountable: Accountable.from_type(params[:type])&.new
|
||||
)
|
||||
end
|
||||
@@ -41,6 +41,6 @@ class AccountsController < ApplicationController
|
||||
private
|
||||
|
||||
def account_params
|
||||
params.require(:account).permit(:name, :accountable_type, :original_balance, :original_currency, :subtype)
|
||||
params.require(:account).permit(:name, :accountable_type, :balance, :currency, :subtype)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user