method

cast

Importance_0
v7.1.3.2 - Show latest stable - 0 notes - Class: Binary
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/binary.rb, line 20
      def cast(value)
        if value.is_a?(Data)
          value.to_s
        else
          value = super
          value = value.b if ::String === value && value.encoding != Encoding::BINARY
          value
        end
      end
Register or log in to add new notes.