From 27285a3dcb80070a61494d642c69181f6bd17508 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Tue, 8 Jul 2025 15:57:29 -0500 Subject: [PATCH] Display tag counts in the filter menu - Provides a little information scent - Prevents being surprised by "no results" --- app/models/tag.rb | 4 ++++ app/views/events/filter/_tag.html.erb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/models/tag.rb b/app/models/tag.rb index 15bab718e..0247a0fa5 100644 --- a/app/models/tag.rb +++ b/app/models/tag.rb @@ -13,4 +13,8 @@ class Tag < ApplicationRecord def hashtag "#" + title end + + def cards_count + cards.count + end end diff --git a/app/views/events/filter/_tag.html.erb b/app/views/events/filter/_tag.html.erb index 551ca026f..8daafea37 100644 --- a/app/views/events/filter/_tag.html.erb +++ b/app/views/events/filter/_tag.html.erb @@ -1,7 +1,7 @@ \ No newline at end of file