Sha256: c32220c5d5fb617a95b83b58decc83b3e8e0a5329ec2dc25cf42d27f10c4510a

Contents?: true

Size: 357 Bytes

Versions: 72

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

72 entries across 72 versions & 1 rubygems

Version Path
alchemy_cms-7.0.8 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.0.7 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.0.6 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.0.5 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.0.4 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.0.3 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-6.1.9 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.0.2 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-6.1.8 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-6.1.7 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.0.1 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.0.0 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.0.0.pre.rc1 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-6.1.6 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.0.0.pre.c app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.0.0.pre.b app/jobs/alchemy/publish_page_job.rb
alchemy_cms-6.1.5 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-6.0.14 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-6.1.4 app/jobs/alchemy/publish_page_job.rb
alchemy_cms-7.0.0.pre.a app/jobs/alchemy/publish_page_job.rb