Flowdock
method

type_cast

Importance_0
v4.2.7 - Show latest stable - 0 notes - Class: Numeric
type_cast(value) public

No documentation

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

Hide source
# File activerecord/lib/active_record/type/numeric.rb, line 8
      def type_cast(value)
        value = case value
                when true then 1
                when false then 0
                when ::String then value.presence
                else value
                end
        super(value)
      end
Register or log in to add new notes.