Flowdock
method

register_type

Importance_0
v5.1.7 - Show latest stable - 0 notes - Class: TypeMap
register_type(key, value = nil, &block) 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/type_map.rb, line 23
      def register_type(key, value = nil, &block)
        raise ::ArgumentError unless value || block
        @cache.clear

        if block
          @mapping[key] = block
        else
          @mapping[key] = proc { value }
        end
      end
Register or log in to add new notes.