Module: Alchemy::Page::PageElements::ClassMethods
- Defined in:
- app/models/alchemy/page/page_elements.rb
Instance Method Summary collapse
-
#copy_elements(source, target) ⇒ Array
Copy page elements.
Instance Method Details
#copy_elements(source, target) ⇒ Array
Copy page elements
38 39 40 41 42 43 44 |
# File 'app/models/alchemy/page/page_elements.rb', line 38 def copy_elements(source, target) repository = source.draft_version.element_repository elements = repository.not_nested page_version = target.draft_version duplicate_elements(elements.unfixed, repository, page_version) + duplicate_elements(elements.fixed, repository, page_version) end |