app/models/pageflow/revision.rb
# Public interface for copying a revision
#
# @since 15.1
Public interface for copying a revision
Public interface for copying a revision
def copy(&block)
      revision = dup
      yield(revision) if block_given?
      widgets.each do |widget|
        widget.copy_to(revision)
      end
      file_usages.each do |file_usage|
        file_usage.copy_to(revision)
      end
      find_revision_components.each do |revision_component|
        revision_component.copy_to(revision)
      end
      revision.save!
      revision
    end
def copy ( & block ) revision = dup yield ( revision ) if block_given? widgets . each do | widget | widget . copy_to ( revision ) end file_usages . each do | file_usage | file_usage . copy_to ( revision ) end find_revision_components . each do | revision_component | revision_component . copy_to ( revision ) end revision . save! revision end
Public interface for copying a revision
Public interface for copying a revision
block
since
None