aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2015-09-21 10:36:45 -0600
committerSean Griffin <sean@seantheprogrammer.com>2015-09-21 10:36:45 -0600
commit821d67cdf71dfe9f28d6cc2756c5a0379c5b1b08 (patch)
tree26edb242b56f8461eb7cf3fc8a9f0518ab97b379
parentd52f74480ae46cd3de7ce697093136b01c7a2172 (diff)
downloadrails-821d67cdf71dfe9f28d6cc2756c5a0379c5b1b08.tar.gz
rails-821d67cdf71dfe9f28d6cc2756c5a0379c5b1b08.tar.bz2
rails-821d67cdf71dfe9f28d6cc2756c5a0379c5b1b08.zip
Require dependencies from stdlib in the Decimal type
In Active Record, it appears these were either autoloaded, which actually was likely due to test ordering since the method `Float#to_d` wouldn't trigger it. This makes it explicit, and unlikely to fail in the future.
-rw-r--r--activemodel/lib/active_model/type/decimal.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/type/decimal.rb b/activemodel/lib/active_model/type/decimal.rb
index 83a16018ea..d19d8baada 100644
--- a/activemodel/lib/active_model/type/decimal.rb
+++ b/activemodel/lib/active_model/type/decimal.rb
@@ -1,3 +1,5 @@
+require "bigdecimal/util"
+
module ActiveModel
module Type
class Decimal < Value # :nodoc: