Class: ActiveModel::AttributeRegistration::ClassMethods::PendingDecorator
Overview
:nodoc:
Instance Method Summary collapse
Methods inherited from Struct
Instance Method Details
#apply_to(attribute_set) ⇒ Object
68 69 70 71 72 73 74 |
# File 'activemodel/lib/active_model/attribute_registration.rb', line 68 def apply_to(attribute_set) (names || attribute_set.keys).each do |name| attribute = attribute_set[name] type = decorator.call(name, attribute.type) attribute_set[name] = attribute.with_type(type) if type end end |