Class: Bongo::Article
- Inherits:
-
Object
- Object
- Bongo::Article
- Includes:
- Mongoid::Document, Mongoid::Slug, Mongoid::Timestamps::Updated
- Defined in:
- app/models/bongo/article.rb
Instance Method Summary collapse
-
#cache_version ⇒ Object
Mongoid (v7.0.8) doesn’t have a cache_version method on its document.
Instance Method Details
#cache_version ⇒ Object
Mongoid (v7.0.8) doesn’t have a cache_version method on its document. This causes jira.mongodb.org/browse/MONGOID-4680 when trying to use Rails collection caching.
18 19 20 21 22 23 24 |
# File 'app/models/bongo/article.rb', line 18 def cache_version if respond_to?(:updated_at) updated_at.utc.to_s(:usec) else nil end end |