Show 'None' instead of 0 in associated-records count badges - #2211
Merged
Conversation
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>
maebeale
marked this pull request as ready for review
August 15, 2026 14:12
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤖 suggested review level: 3 Read 📖 one-line helper change to the shared count-badge renderer
What
Why
0badge looked like a clickable link to an empty index. "None" makes empty associations obvious at a glance.Where
index_buttonhelper (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.2,1,200).Tests
#index_buttonspecs covering the zero → "None" and non-zero delimited-count cases.