From a98094da535b8cb75a6ad3326d404913e6b73e98 Mon Sep 17 00:00:00 2001 From: Nathan <108375368+ncunningham9@users.noreply.github.com> Date: Sun, 1 Mar 2026 11:29:17 -0800 Subject: [PATCH] AO3-7280 Fix: Posting first chapter now posts the work --- app/controllers/chapters_controller.rb | 1 + spec/controllers/chapters_controller_spec.rb | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/chapters_controller.rb b/app/controllers/chapters_controller.rb index a8cea0a5972..070d2f07d46 100644 --- a/app/controllers/chapters_controller.rb +++ b/app/controllers/chapters_controller.rb @@ -152,6 +152,7 @@ def update render :preview else @chapter.posted = true if params[:post_button] || params[:post_without_preview_button] + @work.posted = true if @chapter.posted? posted_changed = @chapter.posted_changed? @work.set_revised_at_by_chapter(@chapter) if @chapter.save && @work.save diff --git a/spec/controllers/chapters_controller_spec.rb b/spec/controllers/chapters_controller_spec.rb index 5da5b55e4d4..ae2fd67d269 100644 --- a/spec/controllers/chapters_controller_spec.rb +++ b/spec/controllers/chapters_controller_spec.rb @@ -783,7 +783,6 @@ end it "posts the work if the work was not posted before" do - pending "multi-chapter works should post when chapter is posted" put :update, params: { work_id: unposted_work.id, id: unposted_work.chapters.first.id, chapter: chapter_attributes, post_button: true } expect(assigns[:work].posted).to be true end