Module: Invoicing::CachedRecord::ActMethods
- Defined in:
- lib/invoicing/cached_record.rb
Instance Method Summary collapse
-
#acts_as_cached_record(*args) ⇒ Object
Call
acts_as_cached_record
on anActiveRecord::Base
class to declare that objects of this class should be cached usingCachedRecord
.
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 notid
, declare the method name of the primary key.
31 32 33 |
# File 'lib/invoicing/cached_record.rb', line 31 def acts_as_cached_record(*args) Invoicing::ClassInfo.acts_as(Invoicing::CachedRecord, self, args) end |