2
0

Limit count to pending&trending on admin/trends/tags page (#35120)

This commit is contained in:
Matt Jankowski
2025-06-23 09:30:12 -04:00
committed by GitHub
parent ebc6897afb
commit c023ebc87a
2 changed files with 20 additions and 1 deletions

View File

@@ -4,7 +4,7 @@ class Admin::Trends::TagsController < Admin::BaseController
def index
authorize :tag, :review?
@pending_tags_count = Tag.pending_review.async_count
@pending_tags_count = pending_tags.async_count
@tags = filtered_tags.page(params[:page])
@form = Trends::TagBatch.new
end
@@ -22,6 +22,10 @@ class Admin::Trends::TagsController < Admin::BaseController
private
def pending_tags
Trends::TagFilter.new(status: :pending_review).results
end
def filtered_tags
Trends::TagFilter.new(filter_params).results
end