Skip to content

Show 'None' instead of 0 in associated-records count badges - #2211

Merged
maebeale merged 1 commit into
mainfrom
maebeale/associated-records-none-badge
Aug 15, 2026
Merged

Show 'None' instead of 0 in associated-records count badges#2211
maebeale merged 1 commit into
mainfrom
maebeale/associated-records-none-badge

Conversation

@maebeale

Copy link
Copy Markdown
Collaborator

🤖 suggested review level: 3 Read 📖 one-line helper change to the shared count-badge renderer

What

  • The associated-records count badge now renders "None" instead of "0" when a record type has no associated records.

Why

  • A 0 badge looked like a clickable link to an empty index. "None" makes empty associations obvious at a glance.

Where

  • index_button helper (app/helpers/application_helper.rb) — the single source for the count badges in both the person and organization associated-records footers, so one edit covers both.
  • Non-zero counts are unchanged (still delimited, e.g. 2, 1,200).

Tests

  • Added #index_button specs covering the zero → "None" and non-zero delimited-count cases.

A zero count read as a clickable badge to an empty index. Rendering
'None' makes empty associations obvious at a glance on the person and
organization footers.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI lite review requested due to automatic review settings August 15, 2026 14:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@maebeale
maebeale marked this pull request as ready for review August 15, 2026 14:12
@maebeale
maebeale merged commit 2436653 into main Aug 15, 2026
3 checks passed
@maebeale
maebeale deleted the maebeale/associated-records-none-badge branch August 15, 2026 14:21
maebeale added a commit that referenced this pull request Aug 15, 2026
main #2211 made index_button show "None" instead of 0. The History card
is hand-rolled (not index_button), so match it for a consistent panel.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants