module
ActiveModel::AttributeRegistration::ClassMethods
v8.0.0 -
Show latest stable
No documentation available for this module.
Constants
PendingDecorator = Struct.new(:names, :decorator) do # :nodoc:\ndef apply_to(attribute_set)\n(names || attribute_set.keys).each do |name|\nattribute = attribute_set[name]\ntype = decorator.call(name, attribute.type)\nattribute_set[name] = attribute.with_type(type) if type\nend\nend\nend
PendingDefault = Struct.new(:name, :default) do # :nodoc:\ndef apply_to(attribute_set)\nattribute_set[name] = attribute_set[name].with_user_default(default)\nend\nend
PendingType = Struct.new(:name, :type) do # :nodoc:\ndef apply_to(attribute_set)\nattribute = attribute_set[name]\nattribute_set[name] = attribute.with_type(type || attribute.type)\nend\nend
Files
- activemodel/lib/active_model/attribute_registration.rb