Skip to content

Instantly share code, notes, and snippets.

@krsyoung
Last active January 4, 2023 05:55
Show Gist options
  • Save krsyoung/f9603bd7aa73b13f72dc2fffd2fbbb6e to your computer and use it in GitHub Desktop.
Save krsyoung/f9603bd7aa73b13f72dc2fffd2fbbb6e to your computer and use it in GitHub Desktop.
<!-- replace all turbo frames with a class of "notifications" -->
<%= turbo_stream.replace_all "div.notifications" do %>
<%= render(Notification::BadgeComponent.new(notifications: current_user.notifications)) %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment