Class: Alchemy::PublishPageJob
- Defined in:
- app/jobs/alchemy/publish_page_job.rb
Instance Method Summary collapse
Instance Method Details
#perform(page_id, public_on:) ⇒ Object
7 8 9 10 11 12 |
# File 'app/jobs/alchemy/publish_page_job.rb', line 7 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 |