Module: NanoStore::AssociationInstanceMethods

Included in:
Model
Defined in:
lib/nano_store/association.rb

Instance Method Summary collapse

Instance Method Details

#_bagsObject



38
39
40
# File 'lib/nano_store/association.rb', line 38

def _bags
  @_bags ||= {}
end

#saveObject



42
43
44
45
46
47
48
# File 'lib/nano_store/association.rb', line 42

def save
  _bags.values.each do |bag|
    bag.store = self.class.store
    bag.save
  end
  super
end