Method: ActiveRecord::Type::TypeMap#alias_type
- Defined in:
- activerecord/lib/active_record/type/type_map.rb
#alias_type(key, target_key) ⇒ Object
35 36 37 38 39 40 |
# File 'activerecord/lib/active_record/type/type_map.rb', line 35 def alias_type(key, target_key) register_type(key) do |sql_type| = sql_type[/\(.*\)/, 0] lookup("#{target_key}#{}") end end |