Class: CmsSnippet

Inherits:
ActiveRecord::Base
  • Object
show all
Extended by:
FriendlyId
Includes:
DmCore::Concerns::FriendlyId
Defined in:
app/models/cms_snippet.rb

Overview

Note: fragment caching is used during rendering. The cache key is based on both the model and the current locale (because each model supports multiple translations). The cache will be busted automatically since the updated_at attribute will be updated on save.


Defined Under Namespace

Classes: Translation

Constant Summary collapse

CONTENT_TYPES =

— content types supported

[ 'Markdown', 'Textile', 'HTML' ]

Instance Method Summary collapse

Instance Method Details

#is_published?Boolean


Returns:

  • (Boolean)


33
34
35
# File 'app/models/cms_snippet.rb', line 33

def is_published?
  published
end

#to_liquidObject




38
39
40
# File 'app/models/cms_snippet.rb', line 38

def to_liquid
  {}
end