1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
module ActiveRecord module ConnectionAdapters module Type class HashLookupTypeMap < TypeMap # :nodoc: def lookup(type) @mapping.fetch(type, proc { default_value }).call(type) end def alias_type(type, alias_type) register_type(type) { lookup(alias_type) } end end end end end