method

parse_raw_value_as_a_number

Importance_0
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - Class: ActiveModel::Validations::NumericalityValidator

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.1.7) is shown here.

parse_raw_value_as_a_number(raw_value) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activemodel/lib/active_model/validations/numericality.rb, line 74
      def parse_raw_value_as_a_number(raw_value)
        return raw_value.to_i if is_integer?(raw_value)
        Kernel.Float(raw_value) if raw_value !~ /\A0[xX]/
      end
Register or log in to add new notes.