123456789_123456789_123456789_123456789_123456789_

Class: ActiveModel::AttributeRegistration::ClassMethods::PendingDefault

Do not use. This class is for internal use only.
Relationships & Source Files
Super Chains via Extension / Inclusion / Inheritance
Class Chain:
self, ::Struct
Instance Chain:
self, ::Struct
Inherits: Struct
  • ::Object
Defined in: activemodel/lib/active_model/attribute_registration.rb

Instance Attribute Summary

Instance Method Summary

Instance Attribute Details

#default (rw, private)

[ GitHub ]

  
# File 'activemodel/lib/active_model/attribute_registration.rb', line 61

PendingDefault = Struct.new(:name, :default)

#name (rw, private)

[ GitHub ]

  
# File 'activemodel/lib/active_model/attribute_registration.rb', line 61

PendingDefault = Struct.new(:name, :default)

Instance Method Details

#apply_to(attribute_set)

[ GitHub ]

  
# File 'activemodel/lib/active_model/attribute_registration.rb', line 62

def apply_to(attribute_set)
  attribute_set[name] = attribute_set[name].with_user_default(default)
end