Sha256: e05de9b14bb3dfe78143d0dbd06a027a2088f102dc719c4b45e8e59a9edd54b2

Contents?: true

Size: 479 Bytes

Versions: 21

Compression:

Stored size: 479 Bytes

Contents

class Pulitzer::PostTypeVersionsController::ClonePostWithVersionElements

  def initialize(post, new_post_type_version)
    @post         = post
    @new_post_type_version  = new_post_type_version
  end

  def call
    new_post = @new_post_type_version.posts.create(title: @post.title)
    @post.clonable_versions.each do |version|
      processing_version = new_post.create_processing_version
      Pulitzer::CloneVersion.new(version, processing_version).call
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
pulitzer-0.15.31 app/interactions/pulitzer/post_type_versions_controller/clone_post_with_version_elements.rb
pulitzer-0.15.30 app/interactions/pulitzer/post_type_versions_controller/clone_post_with_version_elements.rb
pulitzer-0.15.29 app/interactions/pulitzer/post_type_versions_controller/clone_post_with_version_elements.rb
pulitzer-0.15.28 app/interactions/pulitzer/post_type_versions_controller/clone_post_with_version_elements.rb
pulitzer-0.15.27 app/interactions/pulitzer/post_type_versions_controller/clone_post_with_version_elements.rb
pulitzer-0.15.26 app/interactions/pulitzer/post_type_versions_controller/clone_post_with_version_elements.rb
pulitzer-0.15.25 app/interactions/pulitzer/post_type_versions_controller/clone_post_with_version_elements.rb
pulitzer-0.15.24 app/interactions/pulitzer/post_type_versions_controller/clone_post_with_version_elements.rb
pulitzer-0.15.23 app/interactions/pulitzer/post_type_versions_controller/clone_post_with_version_elements.rb
pulitzer-0.15.22 app/interactions/pulitzer/post_type_versions_controller/clone_post_with_version_elements.rb
pulitzer-0.15.21 app/interactions/pulitzer/post_type_versions_controller/clone_post_with_version_elements.rb
pulitzer-0.15.20 app/interactions/pulitzer/post_type_versions_controller/clone_post_with_version_elements.rb
pulitzer-0.15.19 app/interactions/pulitzer/post_type_versions_controller/clone_post_with_version_elements.rb
pulitzer-0.15.18 app/interactions/pulitzer/post_type_versions_controller/clone_post_with_version_elements.rb
pulitzer-0.15.17 app/interactions/pulitzer/post_type_versions_controller/clone_post_with_version_elements.rb
pulitzer-0.15.16 app/interactions/pulitzer/post_type_versions_controller/clone_post_with_version_elements.rb
pulitzer-0.15.15 app/interactions/pulitzer/post_type_versions_controller/clone_post_with_version_elements.rb
pulitzer-0.15.14 app/interactions/pulitzer/post_type_versions_controller/clone_post_with_version_elements.rb
pulitzer-0.15.13 app/interactions/pulitzer/post_type_versions_controller/clone_post_with_version_elements.rb
pulitzer-0.15.12 app/interactions/pulitzer/post_type_versions_controller/clone_post_with_version_elements.rb