Don't prepend yourself to the list if you are not watching

This commit is contained in:
Jorge Manrubia
2025-10-03 19:03:26 +02:00
parent e610bc981e
commit a6383d0e43
2 changed files with 1 additions and 6 deletions
-5
View File
@@ -1,5 +0,0 @@
module UsersHelper
def prepend_current_user_to(users_scope)
users_scope.to_a.prepend(Current.user).uniq
end
end
+1 -1
View File
@@ -11,7 +11,7 @@
</p>
<div class="flex align-center flex-wrap gap-half max-width txt-normal">
<% prepend_current_user_to(@card.watchers.without(User.system).alphabetically).each do |watcher| %>
<% @card.watchers.without(User.system).alphabetically.each do |watcher| %>
<%= avatar_tag watcher %>
<% end %>
</div>