Module: Pageflow::NestedRevisionComponent::Container

Extended by:
ActiveSupport::Concern
Included in:
Pageflow::NestedRevisionComponent
Defined in:
lib/pageflow/nested_revision_component.rb

Overview

Shared functionality of revision components and nested revision components.

Since:

  • 15.5

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#copy_nested_revision_component_to(record, reset_perma_ids: false) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 15.5



17
18
19
20
21
22
23
# File 'lib/pageflow/nested_revision_component.rb', line 17

def copy_nested_revision_component_to(record, reset_perma_ids: false)
  nested_revision_component_collection_names.each do |collection_name|
    send(collection_name).each do |nested|
      nested.copy_to(record.send(collection_name), reset_perma_ids: reset_perma_ids)
    end
  end
end