Method: Volt::ModelIdentityMap#add

Defined in:
lib/volt/models/persistors/model_identity_map.rb

#add(id, model) ⇒ Object

add extends GenericCountingPool so it can add in a model without a direct lookup. We use this when we create a model (without an id) then save it and it gets assigned an id.



10
11
12
# File 'lib/volt/models/persistors/model_identity_map.rb', line 10

def add(id, model)
  @pool[id] = [1, model]
end