Class: TemplateVersion
- Defined in:
- app/models/template_version.rb
Overview
This class stores version text for Template. See Version for details.
Content
Uses TemplateContent.
Instance Attribute Summary
Attributes included from Zena::Use::Workflow::VersionMethods
#backup, #no_clone_on_change, #status_set, #stored_workflow
Class Method Summary collapse
-
.content_class ⇒ Object
TODO: test.
Instance Method Summary collapse
-
#content ⇒ Object
TODO: test.
-
#redaction_content ⇒ Object
TODO: test.
Methods inherited from Version
#author, #cloned, #mark_for_destruction, #node_with_secure, #previous_number
Methods included from Zena::Use::Workflow::VersionMethods
#clone_on_change?, #edited?, included, #should_clone?, #status=, #status_set?
Methods included from Zena::Use::Dates::ModelMethods
Methods included from Zena::Use::Dates::Common
Class Method Details
.content_class ⇒ Object
TODO: test
13 14 15 |
# File 'app/models/template_version.rb', line 13 def self.content_class TemplateContent end |
Instance Method Details
#content ⇒ Object
TODO: test
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'app/models/template_version.rb', line 18 def content return @content if @content @content = content_class.find_by_node_id(self[:node_id]) unless @content # create new content @content = content_class.new @redaction_content = @content @content[:site_id] = node[:site_id] end @content.node = node @content end |
#redaction_content ⇒ Object
TODO: test
33 34 35 |
# File 'app/models/template_version.rb', line 33 def redaction_content content end |