Sha256: 0551ddb3ddaecf174fe5923d69e05a6b93ab88d8dfa9dcb9e7aaf75ef31fd449
Contents?: true
Size: 471 Bytes
Versions: 72
Compression:
Stored size: 471 Bytes
Contents
require 'volt/utils/generic_counting_pool' module Volt # The identity map ensures that there is only one copy of a model # used on the front end at a time. class ModelIdentityMap < GenericCountingPool # 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. def add(id, model) @pool[id] = [1, model] end end end
Version data entries
72 entries across 72 versions & 1 rubygems