Skip to content

Don't skip money's type cast for pluck and calculations#40880

Merged
kamipo merged 1 commit intorails:masterfrom
kamipo:fix_money_type_cast
Dec 18, 2020
Merged

Don't skip money's type cast for pluck and calculations#40880
kamipo merged 1 commit intorails:masterfrom
kamipo:fix_money_type_cast

Conversation

@kamipo
Copy link
Member

@kamipo kamipo commented Dec 18, 2020

Returning OID::Money column type is accidentally skipped in a query
result due to the type is a subclass of Type::Decimal.

Fixes #40860.

Returning `OID::Money` column type is accidentally skipped in a query
result due to the type is a subclass of `Type::Decimal`.

Fixes rails#40860.
@kamipo kamipo merged commit 83ef711 into rails:master Dec 18, 2020
@kamipo kamipo deleted the fix_money_type_cast branch December 18, 2020 10:07
kamipo added a commit that referenced this pull request Dec 18, 2020
Don't skip money's type cast for pluck and calculations
wiegand added a commit to utees/rails that referenced this pull request Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rails 6.1: ActiveRecord: summing a calculation including a money typed column returns a string instead of a number

1 participant