method

cast_value

cast_value(value)
private

No documentation available.

# File activemodel/lib/active_model/type/float.rb, line 14
      def cast_value(value)
        case value
        when ::Float then value
        when "Infinity" then ::Float::INFINITY
        when "-Infinity" then -::Float::INFINITY
        when "NaN" then ::Float::NAN
        else value.to_f
        end
      end