Flowdock
method

cast

Importance_0
v5.2.3 - Show latest stable - 0 notes - Class: Numeric
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 activemodel/lib/active_model/type/helpers/numeric.rb, line 7
        def 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.