Pass user in locals

This commit is contained in:
Kevin McConnell
2025-02-27 10:45:18 +00:00
parent 2b8d41a752
commit 8bd207096b
2 changed files with 2 additions and 2 deletions
@@ -8,7 +8,7 @@
<hr class="separator--horizontal flex-item-grow" style="--border-color: var(--color-subtle-dark); --border-style: dashed" aria-hidden="true">
<label class="switch">
<%= form.checkbox :subscribed, checked: bucket.subscribed_by?(local_assigns[:user]), id: dom_id(bucket, :subscribed),
<%= form.checkbox :subscribed, checked: bucket.subscribed_by?(user), id: dom_id(bucket, :subscribed),
class: "switch__input", include_hidden: false, data: { action: "form#submit" } %>
<span class="switch__btn round"></span>
<span class="for-screen-reader">Enable notifications for this bucket</span>
@@ -20,5 +20,5 @@
<% end %>
<section class="panel center flex flex-column gap-half margin-block">
<%= render partial: "notifications/settings/bucket", collection: @buckets, user: Current.user %>
<%= render partial: "notifications/settings/bucket", collection: @buckets, locals: { user: Current.user } %>
</section>