method
type_for_attribute
rails latest stable - Class:
ActiveModel::AttributeRegistration::ClassMethods
type_for_attribute(attribute_name, &block)public
No documentation available.
# File activemodel/lib/active_model/attribute_registration.rb, line 43
def type_for_attribute(attribute_name, &block)
attribute_name = resolve_attribute_name(attribute_name)
if block
attribute_types.fetch(attribute_name, &block)
else
attribute_types[attribute_name]
end
end