diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-10 15:43:21 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-10 15:51:37 -0800 |
commit | 1cc556dc5263bbbe5845b9a7abde9c84dffa7fb0 (patch) | |
tree | fb72fab8e7d7f2f4fc5d5b4f854447fe8b1b2dd0 /activesupport/lib/active_support/core_ext | |
parent | f4f4964ce0a05cac38bbff3b308ac558228bad29 (diff) | |
download | rails-1cc556dc5263bbbe5845b9a7abde9c84dffa7fb0.tar.gz rails-1cc556dc5263bbbe5845b9a7abde9c84dffa7fb0.tar.bz2 rails-1cc556dc5263bbbe5845b9a7abde9c84dffa7fb0.zip |
adding to_d to BigDecimal
Diffstat (limited to 'activesupport/lib/active_support/core_ext')
-rw-r--r-- | activesupport/lib/active_support/core_ext/big_decimal/conversions.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb b/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb index f7f03f4d95..3720dbb8b8 100644 --- a/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb +++ b/activesupport/lib/active_support/core_ext/big_decimal/conversions.rb @@ -18,6 +18,10 @@ class BigDecimal end end + def to_d + self + end + DEFAULT_STRING_FORMAT = 'F' def to_formatted_s(format = DEFAULT_STRING_FORMAT) _original_to_s(format) |