Module: Invoicing::CachedRecord::ActMethods

Defined in:
lib/invoicing/cached_record.rb

Instance Method Summary collapse

Instance Method Details

#acts_as_cached_record(*args) ⇒ Object

Call acts_as_cached_record on an ActiveRecord::Base class to declare that objects of this class should be cached using CachedRecord.

Accepts options in a hash, all of which are optional:

  • id – If the primary key of this model is not id, declare the method name of the primary key.


34
35
36
# File 'lib/invoicing/cached_record.rb', line 34

def acts_as_cached_record(*args)
  Invoicing::ClassInfo.acts_as(Invoicing::CachedRecord, self, args)
end