Module: Nomo::Model
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/nomo/model.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#cache_key ⇒ Object
21 22 23 24 25 26 27 28 29 30 31 |
# File 'lib/nomo/model.rb', line 21 def cache_key case when new_record? "#{self.class.model_name.cache_key}/new" when = self[:updated_at] = .to_f "#{self.class.model_name.cache_key}/#{id}-#{}" else "#{self.class.model_name.cache_key}/#{id}" end end |