app/models
, alongside your Active Record models.Example
model to respond to a page request.find
the correct All Futures object and make changes to it.id
of the instance you need, you can access it until your Redis cache expiry policy purges it at some point in the distant future.save
operation is now required to persist changes.create
is exactly like new
, except that the model instance is persisted to Redis before it returns. If you want to set your own id
when calling create
, it's important to specify an id
value.id
to the find
method. Numeric values will be converted to String type for performing the lookup.respond_to?
method the see if there is a naming conflict.allfutures
instead of activerecord
.