Sha256: c32220c5d5fb617a95b83b58decc83b3e8e0a5329ec2dc25cf42d27f10c4510a

Contents?: true

Size: 357 Bytes

Versions: 68

Compression:

Stored size: 357 Bytes

Contents

# frozen_string_literal: true

module Alchemy
  class PublishPageJob < BaseJob
    queue_as :default

    def perform(page_id, public_on:)
      page = Alchemy::Page.includes(
        Alchemy::EagerLoading.page_includes(version: :draft_version)
      ).find(page_id)
      Alchemy::Page::Publisher.new(page).publish!(public_on: public_on)
    end
  end
end

Version data entries

68 entries across 68 versions & 1 rubygems

Version Path
alchemy_cms-7.3.4 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.3.3 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.3.2 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.2.7 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.3.1 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.3.0 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.2.6 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.2.5 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.1.12 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.0.15 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-6.1.10 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.2.4 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.1.11 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.2.3 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.1.10 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.2.2 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.1.9 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.0.14 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.2.1 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.0.13 app/jobs/alchemy/publish_page_job.rb