aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/algebra/attributes/float.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/algebra/attributes/float.rb')
-rw-r--r--lib/arel/algebra/attributes/float.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/arel/algebra/attributes/float.rb b/lib/arel/algebra/attributes/float.rb
new file mode 100644
index 0000000000..01c95e69f9
--- /dev/null
+++ b/lib/arel/algebra/attributes/float.rb
@@ -0,0 +1,9 @@
+module Arel
+ module Attributes
+ class Float < Attribute
+ def type_cast(val)
+ type_cast_to_numeric(val, :to_f)
+ end
+ end
+ end
+end