aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/type/float.rb
blob: 42eb44b9a94a47359d169a39c64062f38088beec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
module ActiveRecord
  module Type
    class Float < Value # :nodoc:
      include Numeric

      def type
        :float
      end

      alias type_cast_for_database type_cast

      private

      def cast_value(value)
        value.to_f
      end
    end
  end
end