Update generated entries to not be new after rendering

This commit is contained in:
Andreas Nedbal 2022-11-18 19:43:39 +01:00 committed by Andreas Nedbal
parent 78df5af040
commit f91246986c

View file

@ -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 }