method

type_for_attribute

rails latest stable - Class: ActiveModel::AttributeRegistration::ClassMethods

Method not available on this version

This method is only available on newer versions. The first available version (v7.2.3) is shown here.

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