Sha256: 0a68110ac3be42b9107ef4aef94a80fa14941af0538d77426997922c64fa150e
Contents?: true
Size: 559 Bytes
Versions: 2
Compression:
Stored size: 559 Bytes
Contents
class SpudSnippet < ActiveRecord::Base include CmsDeprecatedMultisite validates :name, presence: true validates :name, uniqueness: true acts_as_tb_liquid_content def postprocess_content template = Liquid::Template.parse(content) self.content_processed = template.render() end def content_processed=(content) self[:content_processed] = content end def content_processed if self[:content_processed].blank? update_column(:content_processed, postprocess_content) end return self[:content_processed] end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
tb_cms-1.3.0 | app/models/spud_snippet.rb |
tb_cms-1.3.beta1 | app/models/spud_snippet.rb |