group tag: split the shown members from the rest in one partition
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0191V6gdWnYUcU5DvJBAWoMj
change
commit b395ebfc829cccbaa76725ac06b795d35f3e6171
author Claude <noreply@anthropic.com>
date
parent 976f4cb5
diff --git a/lib/pro_tacts/admin/group_tag.rb b/lib/pro_tacts/admin/group_tag.rb
index 5d5ecf5..f877335 100644
--- a/lib/pro_tacts/admin/group_tag.rb
+++ b/lib/pro_tacts/admin/group_tag.rb
@@ -22,8 +22,7 @@ module ProTacts
       end
 
       def view_template
-        shown = @members.take(SHOWN)
-        rest = @members.drop(SHOWN)
+        shown, rest = @members.partition.with_index { |_, index| index < SHOWN }
         span do
           a(href: "/groups/#{@group.id}", class: "tag") do
             render Icon.new(:image, size: 12) if @group.photo