Method: Sequel::Model::Associations::AssociationReflection#initialize_association_cache
- Defined in:
- lib/sequel/model/associations.rb
#initialize_association_cache(objects) ⇒ Object
Initialize the associations cache for the current association for the given objects.
424 425 426 427 428 429 430 431 |
# File 'lib/sequel/model/associations.rb', line 424 def initialize_association_cache(objects) name = self[:name] if assign_singular? objects.each{|object| object.associations[name] = nil} else objects.each{|object| object.associations[name] = []} end end |