Prefer each.with_index
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LG4iASZnHb1yEM1JAASiWn
diff --git a/lib/rank_king/views/list/new.rb b/lib/rank_king/views/list/new.rb
index 1025ae7..e3bf58a 100644
--- a/lib/rank_king/views/list/new.rb
+++ b/lib/rank_king/views/list/new.rb
@@ -39,7 +39,7 @@ module RankKing
# Each source's own fields. Only the chosen source's are
# enabled, so only they are checked and posted; app.js
# switches them when the dropdown changes.
- @sources.each_with_index do |(kind, _title, fields), index|
+ @sources.each.with_index do |(kind, _title, fields), index|
fieldset(data_source: kind, disabled: index > 0, hidden: index > 0) { render fields }
end