0
0
Fork 0

Add not_featured_by scope to Tag (#28815)

This commit is contained in:
Matt Jankowski 2024-04-17 06:05:38 -04:00 committed by GitHub
parent 1d3ecd3fba
commit 650c548c31
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 23 additions and 6 deletions

View file

@ -12,10 +12,6 @@ class Api::V1::FeaturedTags::SuggestionsController < Api::BaseController
private
def set_recently_used_tags
@recently_used_tags = Tag.recently_used(current_account).where.not(id: featured_tag_ids).limit(10)
end
def featured_tag_ids
current_account.featured_tags.pluck(:tag_id)
@recently_used_tags = Tag.suggestions_for_account(current_account).limit(10)
end
end