From f91246986c66338a68faeb589af56cd8d2feb9fe Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Fri, 18 Nov 2022 19:43:39 +0100 Subject: [PATCH] Update generated entries to not be new after rendering --- app/controllers/inbox_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/inbox_controller.rb b/app/controllers/inbox_controller.rb index d91afa77..c5af4593 100644 --- a/app/controllers/inbox_controller.rb +++ b/app/controllers/inbox_controller.rb @@ -64,6 +64,8 @@ class InboxController < ApplicationController respond_to do |format| format.turbo_stream do render turbo_stream: turbo_stream.prepend("entries", partial: "inbox/entry", locals: { i: inbox }) + + inbox.update(new: false) end format.html { redirect_to inbox_path }