group tag: slice the shown members and the rest with []
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0191V6gdWnYUcU5DvJBAWoMj
diff --git a/lib/pro_tacts/admin/group_tag.rb b/lib/pro_tacts/admin/group_tag.rb
index 509b3f6..7b3132c 100644
--- a/lib/pro_tacts/admin/group_tag.rb
+++ b/lib/pro_tacts/admin/group_tag.rb
@@ -20,7 +20,9 @@ module ProTacts
end
def view_template
- shown, rest = @group.listed_members.partition.with_index { |_, index| index < SHOWN }
+ members = @group.listed_members
+ # A slice starting past the end is nil rather than empty.
+ shown, rest = members[...SHOWN], members[SHOWN..].to_a
span do
a(href: "/groups/#{@group.id}", class: "tag") do
render Icon.new(:image, size: 12) if @group.photo