app/controllers/wallet/transactions_controller.rb
# Only allow a trusted parameter "white list" through.
Only allow a trusted parameter "white list" through.
Only allow a trusted parameter " white list " through .
def transaction_params
        return params.require(:topup).permit(:account_id, :amount) if params.has_key? :topup
        return params.require(:spend).permit(:account_id, :amount) if params.has_key? :spend
        return params.require(:transfer).permit(:account_id, :amount,:to) if params.has_key? :transfer
      end
def transaction_params return params . require ( :topup ) . permit ( :account_id , :amount ) if params . has_key? :topup return params . require ( :spend ) . permit ( :account_id , :amount ) if params . has_key? :spend return params . require ( :transfer ) . permit ( :account_id , :amount , :to ) if params . has_key? :transfer end
Only allow a trusted parameter "white list" through.
Only allow a trusted parameter " white list " through .