Use async_count
in more view locations (#32086)
This commit is contained in:
parent
77f5b127fa
commit
4fe7f213a6
8 changed files with 8 additions and 4 deletions
|
@ -6,6 +6,7 @@ class Admin::AnnouncementsController < Admin::BaseController
|
|||
|
||||
def index
|
||||
authorize :announcement, :index?
|
||||
@published_announcements_count = Announcement.published.async_count
|
||||
end
|
||||
|
||||
def new
|
||||
|
|
|
@ -6,6 +6,7 @@ class Admin::Disputes::AppealsController < Admin::BaseController
|
|||
def index
|
||||
authorize :appeal, :index?
|
||||
|
||||
@pending_appeals_count = Appeal.pending.async_count
|
||||
@appeals = filtered_appeals.page(params[:page])
|
||||
end
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ class Admin::Trends::Links::PreviewCardProvidersController < Admin::BaseControll
|
|||
def index
|
||||
authorize :preview_card_provider, :review?
|
||||
|
||||
@pending_preview_card_providers_count = PreviewCardProvider.unreviewed.async_count
|
||||
@preview_card_providers = filtered_preview_card_providers.page(params[:page])
|
||||
@form = Trends::PreviewCardProviderBatch.new
|
||||
end
|
||||
|
|
|
@ -4,6 +4,7 @@ class Admin::Trends::TagsController < Admin::BaseController
|
|||
def index
|
||||
authorize :tag, :review?
|
||||
|
||||
@pending_tags_count = Tag.pending_review.async_count
|
||||
@tags = filtered_tags.page(params[:page])
|
||||
@form = Trends::TagBatch.new
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue