Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby
829 B
Raw Blame
<%= turbo_stream.replace "insights-list" do %>
  <%= render "insights/list", insights: @insights, unread_ids: @unread_ids %>
<% end %>

<%# Dashboard well, when it's still on screen. If acknowledging the last insight
    removed the whole section, there is no target left to replace and the widget
    comes back on the next dashboard render — this action has no UI entry point
    since the undo toast was dropped, so it isn't worth rebuilding the section
    shell from here. %>
<%= turbo_stream.replace "insights-feed" do %>
  <%= render "pages/dashboard/insights_feed", insights: @feed_insights %>
<% end %>

<%# Lightbulb badge in both layout copies (desktop header, mobile top nav). %>
<%= turbo_stream.replace_all "[data-insights-badge]", partial: "layouts/shared/insights_badge", locals: { count: @unread_ids.size } %>