Module: Pageflow::NestedRevisionComponent::Container::ClassMethods

Defined in:
lib/pageflow/nested_revision_component.rb

Overview

Macro methods to declare nested revision components

Since:

  • 15.5

Instance Method Summary collapse

Instance Method Details

#nested_revision_components(*collection_names) ⇒ Object

Call this macro in the body of a class which includes ‘RevisionComponent` or `NestedRevisionComponent` and pass the name of an association that shall be included when the revision component is copied to a new revision. The associated model needs to be a `NestedRevisionComponent`.

Since:

  • 15.5



32
33
34
# File 'lib/pageflow/nested_revision_component.rb', line 32

def nested_revision_components(*collection_names)
  self.nested_revision_component_collection_names = collection_names
end